Skip to content

Commit ba996b5

Browse files
committed
catch only Exception closing bitly#1
1 parent 65d3da4 commit ba996b5

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

bitly_api/bitly_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,6 @@ def _call(self, host, method, params, secret=None, timeout=5000):
326326
return data
327327
except BitlyError:
328328
raise
329-
except:
329+
except Exception:
330330
raise BitlyError(None, sys.exc_info()[1])
331331

bitly_api/bitly_http.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ def makePycurlHttp(url, timeout, user_agent):
5757
buffer.close()
5858
http_status_code = curl.getinfo(pycurl.HTTP_CODE)
5959
curl.close()
60-
except:
60+
except Exception:
6161
try:
6262
curl.close()
63-
except:
63+
except Exception:
6464
pass
6565
raise
6666
return http_status_code, result

0 commit comments

Comments
 (0)