Skip to content

Commit

Permalink
Update raise exception in Webauth.cli_login
Browse files Browse the repository at this point in the history
  • Loading branch information
sammiee5311 authored and rossengeorgiev committed Jan 6, 2022
1 parent 0c5c8a5 commit e8c929d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions steam/webauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ def login(self, password='', captcha='', email_code='', twofactor_code='', langu
raise EmailCodeRequired(resp['message'])
elif resp.get('requires_twofactor', False):
raise TwoFactorCodeRequired(resp['message'])
elif 'short time period' in resp.get('message', ''):
raise TooManyTimesFailed(resp['message'])
else:
self.password = ''
raise LoginIncorrect(resp['message'])
Expand Down Expand Up @@ -404,3 +406,6 @@ class EmailCodeRequired(WebAuthException):

class TwoFactorCodeRequired(WebAuthException):
pass

class TooManyTimesFailed(WebAuthException):
pass

0 comments on commit e8c929d

Please sign in to comment.