Unverified Commit 89b35f28 authored by messense's avatar messense

Do not use bare except

parent 18528797
...@@ -34,7 +34,7 @@ class JPush(object): ...@@ -34,7 +34,7 @@ class JPush(object):
headers=headers, timeout=self.timeout) headers=headers, timeout=self.timeout)
except requests.exceptions.ConnectTimeout: except requests.exceptions.ConnectTimeout:
raise common.APIConnectionException("Connection to api.jpush.cn timed out.") raise common.APIConnectionException("Connection to api.jpush.cn timed out.")
except: except Exception:
raise common.APIConnectionException("Connection to api.jpush.cn error.") raise common.APIConnectionException("Connection to api.jpush.cn error.")
logger.debug("Received %s response. Headers:\n\t%s\nBody:\n\t%s", response.status_code, '\n\t'.join( logger.debug("Received %s response. Headers:\n\t%s\nBody:\n\t%s", response.status_code, '\n\t'.join(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment