summaryrefslogtreecommitdiffstats
path: root/ipaserver
diff options
context:
space:
mode:
authorRobert Kuska <rkuska@redhat.com>2015-08-24 12:40:33 +0200
committerJan Cholasta <jcholast@redhat.com>2015-09-30 10:51:36 +0200
commit01da4a8de3ed8651cc95df6125751e1603dbd14e (patch)
tree823856bad461808163b3fc05c54e0d87d26dd381 /ipaserver
parent34e6c3ea05b23f4a5fe6fb6aaadd394967f31340 (diff)
downloadfreeipa-01da4a8de3ed8651cc95df6125751e1603dbd14e.tar.gz
freeipa-01da4a8de3ed8651cc95df6125751e1603dbd14e.tar.xz
freeipa-01da4a8de3ed8651cc95df6125751e1603dbd14e.zip
Replace StandardError with Exception
StandardError was removed in Python3 and instead Exception should be used. Signed-off-by: Robert Kuska <rkuska@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipaserver')
-rw-r--r--ipaserver/rpcserver.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/ipaserver/rpcserver.py b/ipaserver/rpcserver.py
index 1195d5c88..554f4f506 100644
--- a/ipaserver/rpcserver.py
+++ b/ipaserver/rpcserver.py
@@ -282,11 +282,11 @@ class wsgi_dispatch(Executioner, HTTP_Status):
Mount the WSGI application *app* at *key*.
"""
# if self.__islocked__():
-# raise StandardError('%s.mount(): locked, cannot mount %r at %r' % (
+# raise Exception('%s.mount(): locked, cannot mount %r at %r' % (
# self.name, app, key)
# )
if key in self.__apps:
- raise StandardError('%s.mount(): cannot replace %r with %r at %r' % (
+ raise Exception('%s.mount(): cannot replace %r with %r at %r' % (
self.name, self.__apps[key], app, key)
)
self.debug('Mounting %r at %r', app, key)
@@ -354,7 +354,7 @@ class WSGIExecutioner(Executioner):
if self.api.env.debug:
self.debug('WSGI wsgi_execute PublicError: %s', traceback.format_exc())
error = e
- except StandardError as e:
+ except Exception as e:
self.exception(
'non-public: %s: %s', e.__class__.__name__, str(e)
)
@@ -407,7 +407,7 @@ class WSGIExecutioner(Executioner):
status = HTTP_STATUS_SUCCESS
response = self.wsgi_execute(environ)
headers = [('Content-Type', self.content_type + '; charset=utf-8')]
- except StandardError as e:
+ except Exception as e:
self.exception('WSGI %s.__call__():', self.name)
status = HTTP_STATUS_SERVER_ERROR
response = status