-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Milestone
Description
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
Labels
No labels