Skip to content

Commit 9bf9b21

Browse files
Fix PEP8 for "errors.py"
1 parent a76b4ab commit 9bf9b21

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

instagram/errors.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
DEALINGS IN THE SOFTWARE.
2525
"""
2626

27+
2728
class InstagramException(Exception):
2829
"""Base exception class for instagram.py
2930
@@ -32,13 +33,15 @@ class InstagramException(Exception):
3233
"""
3334
pass
3435

36+
3537
class ClientException(InstagramException):
3638
"""Exception that's thrown when an operation in the :class:`Client` fails.
3739
3840
These are usually for exceptions that happened due to user input.
3941
"""
4042
pass
4143

44+
4245
class HTTPException(InstagramException):
4346
"""Exception that's thrown when an HTTP request operation fails.
4447
@@ -66,17 +69,19 @@ def __init__(self, response, message):
6669

6770
fmt = '{0.reason} (status code: {0.status})'
6871
if len(self.text):
69-
fmt = fmt + ': {1}'
72+
fmt += ': {1}'
7073

7174
super().__init__(fmt.format(self.response, self.text))
7275

76+
7377
class Forbidden(HTTPException):
7478
"""Exception that's thrown for when status code 403 occurs.
7579
7680
Subclass of :exc:`HTTPException`
7781
"""
7882
pass
7983

84+
8085
class NotFound(HTTPException):
8186
"""Exception that's thrown for when status code 404 occurs.
8287
@@ -95,6 +100,7 @@ class InvalidArgument(ClientException):
95100
"""
96101
pass
97102

103+
98104
class LoginFailure(ClientException):
99105
"""Exception that's thrown when the :meth:`Client.login` function
100106
fails to log you in from improper credentials or some other misc.

0 commit comments

Comments
 (0)