From 4d2fede2202c48469aa2300234906d171b7dd7d0 Mon Sep 17 00:00:00 2001 From: parkerlreed Date: Fri, 21 Jul 2017 18:58:53 -0700 Subject: [PATCH] Fixed fwfetcher to use as in two except statements (#519) Signed-off-by: Benn Snyder --- src/fwfetcher.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fwfetcher.py b/src/fwfetcher.py index 4e3bafe0..b10c7ced 100644 --- a/src/fwfetcher.py +++ b/src/fwfetcher.py @@ -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