py3: Remove py3 incompatible exception handling

https://fedorahosted.org/freeipa/ticket/5585

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
This commit is contained in:
Tomas Babej
2016-01-08 18:23:35 +01:00
committed by Martin Basti
parent 00c13fd340
commit 50627004b8
3 changed files with 5 additions and 5 deletions

View File

@@ -752,9 +752,9 @@ def run(api):
except KeyboardInterrupt:
print ''
api.log.info('operation aborted')
except PublicError, e:
except PublicError as e:
error = e
except Exception, e:
except Exception as e:
api.log.exception('%s: %s', e.__class__.__name__, str(e))
error = InternalError()
if error is not None:

View File

@@ -13,7 +13,7 @@ env._finalize_core(**dict(DEFAULT_CONFIG))
api.bootstrap(context='server', debug=env.debug, log=None) (ref:wsgi-app-bootstrap)
try:
api.finalize() (ref:wsgi-app-finalize)
except Exception, e:
except Exception as e:
api.log.error('Failed to start IPA: %s' % e)
else:
api.log.info('*** PROCESS START ***')