# HG changeset patch # User Laurent Peuch # Date 1557967180 -7200 # Node ID 3bf9002de48e65f708390d6eee60b526a2837e14 # Parent ea15ac05c4476762ac07c5ef7c23f94b4abf8445 [autopep8] E301 - Add missing blank line diff -r ea15ac05c447 -r 3bf9002de48e cubicweb/_exceptions.py --- a/cubicweb/_exceptions.py Thu May 16 01:23:51 2019 +0200 +++ b/cubicweb/_exceptions.py Thu May 16 02:39:40 2019 +0200 @@ -79,6 +79,7 @@ class UniqueTogetherError(RepositoryError): """raised when a unique_together constraint caused an IntegrityError""" + def __init__(self, session, **kwargs): self.session = session assert 'rtypes' in kwargs or 'cstrname' in kwargs diff -r ea15ac05c447 -r 3bf9002de48e cubicweb/web/_exceptions.py --- a/cubicweb/web/_exceptions.py Thu May 16 01:23:51 2019 +0200 +++ b/cubicweb/web/_exceptions.py Thu May 16 02:39:40 2019 +0200 @@ -26,6 +26,7 @@ class DirectResponse(Exception): """Used to supply a twitted HTTP Response directly""" + def __init__(self, response): self.response = response @@ -44,12 +45,14 @@ class LogOut(PublishException): """raised to ask for deauthentication of a logged in user""" + def __init__(self, url=None): super(LogOut, self).__init__() self.url = url class Redirect(PublishException): """raised to redirect the http request""" + def __init__(self, location, status=http_client.SEE_OTHER): super(Redirect, self).__init__(status=status) self.location = location @@ -83,6 +86,7 @@ class ProcessFormError(RequestError): """raised when posted data can't be processed by the corresponding field """ + def __init__(self, *args, **kwargs): kwargs.setdefault('status', http_client.BAD_REQUEST) super(ProcessFormError, self).__init__(*args, **kwargs) @@ -98,6 +102,7 @@ class RemoteCallFailed(RequestError): """raised when a json remote call fails """ + def __init__(self, reason='', status=http_client.INTERNAL_SERVER_ERROR): super(RemoteCallFailed, self).__init__(reason, status=status) self.reason = reason