Skip to content

Bug in fwfetcher urlopen response #500

@bonsairobo

Description

@bonsairobo

Here's the offending code:

req = Request(url)
try:
	response = urlopen(req)
except URLError, e:
	if hasattr(e, 'reason'):
		print "Failed to reach download server.  Reason:", e.reason
	elif hasattr(e, 'code'):
		print "The server couldn't fulfill the request.  Error code:", e.code
print "Reading response..."
retval = response.read()

I get UnboundLocalError: local variable 'response' referenced before assignment because the URL timed out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions