Skip to content

Commit 2e60d09

Browse files
committed
Small VkApi.security_check fix
1 parent 3f1040f commit 2e60d09

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

vk_api/vk_api.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def vk_login(self, captcha_sid=None, captcha_key=None):
282282
'Unknown error. Please send bugreport: https://vk.com/python273'
283283
)
284284

285-
response = self.security_check()
285+
response = self.security_check(response)
286286

287287
if 'act=blocked' in response.url:
288288
raise AccountBlocked('Account is blocked')
@@ -325,10 +325,9 @@ def security_check(self, response=None):
325325
if response is None:
326326
response = self.http.get('https://vk.com/settings')
327327

328-
if 'security_check' not in response.url:
329-
self.logger.info('Security check is not required')
330-
331-
return response
328+
if 'security_check' not in response.url:
329+
self.logger.info('Security check is not required')
330+
return response
332331

333332
phone_prefix = clear_string(search_re(RE_PHONE_PREFIX, response.text))
334333
phone_postfix = clear_string(search_re(RE_PHONE_POSTFIX, response.text))

0 commit comments

Comments
 (0)