From 27dabb45282911e375336f75934af9dd6cc5d963 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 30 Jul 2015 16:49:29 +0200 Subject: Modernize 'except' clauses The 'as' syntax works from Python 2 on, and Python 3 will drop the "comma" syntax. Reviewed-By: Tomas Babej --- ipatests/test_pkcs10/test_pkcs10.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ipatests/test_pkcs10') diff --git a/ipatests/test_pkcs10/test_pkcs10.py b/ipatests/test_pkcs10/test_pkcs10.py index c5a1c56b1..86314dfe5 100644 --- a/ipatests/test_pkcs10/test_pkcs10.py +++ b/ipatests/test_pkcs10/test_pkcs10.py @@ -111,7 +111,7 @@ class test_update(object): try: request = pkcs10.load_certificate_request(csr) - except NSPRError, nsprerr: + except NSPRError as nsprerr: # (SEC_ERROR_BAD_DER) security library: improperly formatted DER-encoded message. assert(nsprerr. errno== -8183) @@ -122,5 +122,5 @@ class test_update(object): csr = self.read_file("test4.csr") try: request = pkcs10.load_certificate_request(csr) - except TypeError, typeerr: + except TypeError as typeerr: assert(str(typeerr) == 'Incorrect padding') -- cgit