From 01da4a8de3ed8651cc95df6125751e1603dbd14e Mon Sep 17 00:00:00 2001 From: Robert Kuska Date: Mon, 24 Aug 2015 12:40:33 +0200 Subject: Replace StandardError with Exception StandardError was removed in Python3 and instead Exception should be used. Signed-off-by: Robert Kuska Reviewed-By: Jan Cholasta --- ipaserver/rpcserver.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ipaserver/rpcserver.py') 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 -- cgit