Skip to content

Commit

Permalink
Fixed fwfetcher to use as in two except statements (OpenKinect#519)
Browse files Browse the repository at this point in the history
Signed-off-by: Benn Snyder <[email protected]>
  • Loading branch information
parkerlreed authored and piedar committed Jul 22, 2017
1 parent 072c210 commit 4d2fede
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fwfetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,12 +526,12 @@ def urlopen_timeout_retry(request, attempts = 5):
for attempt in range(attempts):
try:
return urlopen(request)
except URLError, e:
except URLError as e:
if isinstance(e.reason, socket.timeout):
print("Timeout! ", e)
else: raise
last_error = e
except socket.timeout, e:
except socket.timeout as e:
print("Timeout! ", e)
last_error = e
raise last_error
Expand Down

0 comments on commit 4d2fede

Please sign in to comment.