summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/dogtaginstance.py
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2015-07-30 16:49:29 +0200
committerTomas Babej <tbabej@redhat.com>2015-08-12 18:17:23 +0200
commit27dabb45282911e375336f75934af9dd6cc5d963 (patch)
tree3c8fe5255d60613fa9cd14d053b3688feed740c9 /ipaserver/install/dogtaginstance.py
parenta651be3eec2a08bd2865b16b0eed767db69aab0f (diff)
downloadfreeipa-27dabb45282911e375336f75934af9dd6cc5d963.tar.gz
freeipa-27dabb45282911e375336f75934af9dd6cc5d963.tar.xz
freeipa-27dabb45282911e375336f75934af9dd6cc5d963.zip
Modernize 'except' clauses
The 'as' syntax works from Python 2 on, and Python 3 will drop the "comma" syntax. Reviewed-By: Tomas Babej <tbabej@redhat.com>
Diffstat (limited to 'ipaserver/install/dogtaginstance.py')
-rw-r--r--ipaserver/install/dogtaginstance.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/ipaserver/install/dogtaginstance.py b/ipaserver/install/dogtaginstance.py
index 33f39f793..c377bfe2b 100644
--- a/ipaserver/install/dogtaginstance.py
+++ b/ipaserver/install/dogtaginstance.py
@@ -175,7 +175,7 @@ class DogtagInstance(service.Service):
try:
ipautil.run(args, nolog=nolog)
- except ipautil.CalledProcessError, e:
+ except ipautil.CalledProcessError as e:
self.handle_setup_error(e)
def restart_instance(self):
@@ -270,7 +270,7 @@ class DogtagInstance(service.Service):
ipautil.run([paths.PKIDESTROY, "-i",
self.dogtag_constants.PKI_INSTANCE_NAME,
"-s", self.subsystem])
- except ipautil.CalledProcessError, e:
+ except ipautil.CalledProcessError as e:
self.log.critical("failed to uninstall %s instance %s",
self.subsystem, e)
@@ -310,7 +310,7 @@ class DogtagInstance(service.Service):
try:
return certmonger.get_pin('internal',
dogtag_constants=self.dogtag_constants)
- except IOError, e:
+ except IOError as e:
self.log.debug(
'Unable to determine PIN for the Dogtag instance: %s', e)
raise RuntimeError(e)
@@ -330,7 +330,7 @@ class DogtagInstance(service.Service):
pre_command='stop_pkicad',
post_command='renew_ca_cert "%s"' % nickname,
profile=profile)
- except RuntimeError, e:
+ except RuntimeError as e:
self.log.error(
"certmonger failed to start tracking certificate: %s", e)
@@ -350,7 +350,7 @@ class DogtagInstance(service.Service):
secdir=self.dogtag_constants.ALIAS_DIR,
pre_command='stop_pkicad',
post_command='renew_ca_cert "%s"' % self.server_cert_name)
- except RuntimeError, e:
+ except RuntimeError as e:
self.log.error(
"certmonger failed to start tracking certificate: %s" % e)
@@ -373,7 +373,7 @@ class DogtagInstance(service.Service):
try:
certmonger.stop_tracking(
self.dogtag_constants.ALIAS_DIR, nickname=nickname)
- except RuntimeError, e:
+ except RuntimeError as e:
self.log.error(
"certmonger failed to stop tracking certificate: %s", e)