Skip to content

Commit 7d7697f

Browse files
committed
Correct handling of error BadPassword
1 parent 0f67856 commit 7d7697f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

vk_api/vk_api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,10 @@ def vk_login(self, captcha_sid=None, captcha_key=None):
137137
self.error_handlers[CAPTCHA_ERROR_CODE](captcha)
138138
else:
139139
raise AuthorizationError('Authorization error (capcha)')
140-
else:
140+
elif 'm=1' in response.url:
141141
raise BadPassword('Bad password')
142+
else:
143+
raise AuthorizationError('Unknown error. Please send bugreport.')
142144

143145
if 'security_check' in response.url:
144146
self.security_check(response=response)

0 commit comments

Comments
 (0)