Sort Exceptions

This commit is contained in:
Quentin POLLET 2020-03-09 22:37:31 +01:00 committed by Quentame
parent 412cfd8c7e
commit 01aeb8335a

View file

@ -3,10 +3,7 @@ class PyiCloudException(Exception):
pass pass
class PyiCloudNoDevicesException(PyiCloudException): # API
pass
class PyiCloudAPIResponseException(PyiCloudException): class PyiCloudAPIResponseException(PyiCloudException):
def __init__(self, reason, code, retry=False): def __init__(self, reason, code, retry=False):
self.reason = reason self.reason = reason
@ -20,6 +17,11 @@ class PyiCloudAPIResponseException(PyiCloudException):
super(PyiCloudAPIResponseException, self).__init__(message) super(PyiCloudAPIResponseException, self).__init__(message)
class PyiCloudServiceNotActivatedException(PyiCloudAPIResponseException):
pass
# Login
class PyiCloudFailedLoginException(PyiCloudException): class PyiCloudFailedLoginException(PyiCloudException):
pass pass
@ -34,5 +36,6 @@ class PyiCloudNoStoredPasswordAvailableException(PyiCloudException):
pass pass
class PyiCloudServiceNotActivatedException(PyiCloudAPIResponseException): # Webservice specific
class PyiCloudNoDevicesException(PyiCloudException):
pass pass