summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Callaghan <dcallagh@redhat.com>2014-06-20 11:42:18 +1000
committerDan Callaghan <dcallagh@redhat.com>2014-06-23 14:50:27 +1000
commita0c25563466e452e3e04c8febd862f9424b3e0c0 (patch)
tree1bc77ccd02299a0ae1b466c28190dfa1b09c3a87
parent3748f14d708232ebb924dd1dd459bbd82b300028 (diff)
bare except: clause is bad
At least under gunicorn, SystemExit can be raised anywhere. 2014-06-20 11:40:39,998 bkr.server.xmlrpccontroller ERROR Error handling XML-RPC method Traceback (most recent call last): File "Server/bkr/server/xmlrpccontroller.py", line 53, in RPC2 response = self.process_rpc(method,params) File "Server/bkr/server/xmlrpccontroller.py", line 42, in process_rpc response = obj(*params) File "Server/bkr/server/authentication.py", line 76, in login_password if not user.check_password(password): File "Server/bkr/server/model/identity.py", line 241, in check_password raw_password, self._password) File "/usr/lib/python2.6/site-packages/passlib/context.py", line 2592, in verify_and_update if not record.verify(secret, hash, **kwds): File "/usr/lib/python2.6/site-packages/passlib/utils/handlers.py", line 571, in verify return consteq(self._calc_checksum(secret), chk) File "/usr/lib/python2.6/site-packages/passlib/handlers/pbkdf2.py", line 84, in _calc_checksum return pbkdf2(secret, self.salt, self.rounds, self.checksum_size, self._prf) File "/usr/lib/python2.6/site-packages/passlib/utils/pbkdf2.py", line 411, in pbkdf2 return join_bytes(gen())[:keylen] File "/usr/lib/python2.6/site-packages/passlib/utils/pbkdf2.py", line 408, in gen digest = prf_func(secret, digest) File "/usr/lib/python2.6/site-packages/passlib/utils/pbkdf2.py", line 174, in prf return hmac_const(key, msg, digest) File "/usr/lib64/python2.6/site-packages/M2Crypto/EVP.py", line 98, in hmac return m2.hmac(key, data, md()) File "/usr/lib/python2.6/site-packages/gunicorn/workers/base.py", line 137, in handle_exit sys.exit(0) SystemExit: 0 Change-Id: I58dd93798bdd907c4f2c8a5beda89a7caa623ab6
-rw-r--r--Server/bkr/server/xmlrpccontroller.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Server/bkr/server/xmlrpccontroller.py b/Server/bkr/server/xmlrpccontroller.py
index d0734a6..b773f1f 100644
--- a/Server/bkr/server/xmlrpccontroller.py
+++ b/Server/bkr/server/xmlrpccontroller.py
@@ -63,7 +63,7 @@ class RPCRoot(controllers.Controller):
except Invalid, e:
session.rollback()
response = xmlrpclib.dumps(xmlrpclib.Fault(1, str(e)))
- except:
+ except Exception:
session.rollback()
log.exception('Error handling XML-RPC method')
# Some other error; send back some error info