Skip to content

Commit 3862261

Browse files
committed
Add calling parent's __init__ in exceptions
1 parent 1d24cbe commit 3862261

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

vk_api/exceptions.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ class TwoFactorError(AuthError):
4949
class SecurityCheck(AuthError):
5050

5151
def __init__(self, phone_prefix=None, phone_postfix=None, response=None):
52+
super(SecurityCheck, self).__init__()
53+
5254
self.phone_prefix = phone_prefix
5355
self.phone_postfix = phone_postfix
5456
self.response = response
@@ -66,6 +68,8 @@ def __str__(self):
6668
class ApiError(VkApiError):
6769

6870
def __init__(self, vk, method, values, raw, error):
71+
super(ApiError, self).__init__()
72+
6973
self.vk = vk
7074
self.method = method
7175
self.values = values
@@ -86,6 +90,8 @@ def __str__(self):
8690
class ApiHttpError(VkApiError):
8791

8892
def __init__(self, vk, method, values, raw, response):
93+
super(ApiHttpError, self).__init__()
94+
8995
self.vk = vk
9096
self.method = method
9197
self.values = values
@@ -104,6 +110,8 @@ def __str__(self):
104110
class Captcha(VkApiError):
105111

106112
def __init__(self, vk, captcha_sid, func, args=None, kwargs=None, url=None):
113+
super(Captcha, self).__init__()
114+
107115
self.vk = vk
108116
self.sid = captcha_sid
109117
self.func = func

0 commit comments

Comments
 (0)