Skip to content

Commit

Permalink
Add calling parent's __init__ in exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
python273 committed Sep 11, 2020
1 parent 1d24cbe commit 3862261
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions vk_api/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ class TwoFactorError(AuthError):
class SecurityCheck(AuthError):

def __init__(self, phone_prefix=None, phone_postfix=None, response=None):
super(SecurityCheck, self).__init__()

self.phone_prefix = phone_prefix
self.phone_postfix = phone_postfix
self.response = response
Expand All @@ -66,6 +68,8 @@ def __str__(self):
class ApiError(VkApiError):

def __init__(self, vk, method, values, raw, error):
super(ApiError, self).__init__()

self.vk = vk
self.method = method
self.values = values
Expand All @@ -86,6 +90,8 @@ def __str__(self):
class ApiHttpError(VkApiError):

def __init__(self, vk, method, values, raw, response):
super(ApiHttpError, self).__init__()

self.vk = vk
self.method = method
self.values = values
Expand All @@ -104,6 +110,8 @@ def __str__(self):
class Captcha(VkApiError):

def __init__(self, vk, captcha_sid, func, args=None, kwargs=None, url=None):
super(Captcha, self).__init__()

self.vk = vk
self.sid = captcha_sid
self.func = func
Expand Down

0 comments on commit 3862261

Please sign in to comment.