diff --git a/certidude/api/request.py b/certidude/api/request.py index 97d6ceb..c1af6fc 100644 --- a/certidude/api/request.py +++ b/certidude/api/request.py @@ -85,7 +85,7 @@ class RequestListResource(object): try: renewal_signature = b64decode(renewal_header) - except TypeError, ValueError: + except (TypeError, ValueError): logger.error(u"Renewal failed, bad signature supplied for %s", common_name) reasons.append("Renewal failed, bad signature supplied") else: diff --git a/certidude/api/scep.py b/certidude/api/scep.py index cf92f58..dff8633 100644 --- a/certidude/api/scep.py +++ b/certidude/api/scep.py @@ -139,7 +139,7 @@ class SCEPResource(object): signed_certificate = asymmetric.load_certificate(buf) content = signed_certificate.asn1.dump() - except SCEPError, e: + except SCEPError as e: attr_list.append(cms.CMSAttribute({ 'type': u"fail_info", 'values': ["%d" % e.code]