File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,8 @@ https://github.com/opulentfox-29/protonmail-api-client/blob/master/src/protonmai
103103class SendMessageError (Exception ):
104104"""Error when trying to send message"""
105105
106+ class InvalidPassword (Exception ):
107+ """Invalid username or password"""
106108
107109class InvalidTwoFactorCode (Exception ):
108110"""Invalid Two-Factor Authentication (2FA) code"""
@@ -1381,6 +1383,8 @@ class ProtonMail:
13811383raise InvalidCaptcha (auth ['Error' ])
13821384if auth ["Code" ] == 2028 :
13831385raise ConnectionRefusedError (f"Too many recent logins: { auth .get ('Error' )} " )
1386+ if auth ["Code" ] == 8002 :
1387+ raise InvalidPassword ("Invalid username or password" )
13841388
13851389self .user .verify_session (b64decode (auth ['ServerProof' ]))
13861390
@@ -1643,9 +1647,9 @@ else:
16431647
16441648if "--authenticate" in sys .argv :
16451649if "--alternate-auth" in sys .argv :
1646- login_type = LoginType .DEV
1647- else :
16481650login_type = LoginType .WEB
1651+ else :
1652+ login_type = LoginType .DEV
16491653
16501654username = input ("Enter your Proton Mail username: " )
16511655password = getpass .getpass ("Enter your Proton Mail password: " )
You can’t perform that action at this time.
0 commit comments