Raise exception on bad login credentials
authorJakob <jakob@jcornell.net>
Wed, 4 Dec 2019 05:21:56 +0000 (23:21 -0600)
committerJakob <jakob@jcornell.net>
Wed, 4 Dec 2019 05:21:56 +0000 (23:21 -0600)
auth.py

diff --git a/auth.py b/auth.py
index eecafd70879a47f7bc0582e7089718c962ff24ce..b99719d668f942ff2840f65148632461a6b3f0fa 100644 (file)
--- a/auth.py
+++ b/auth.py
@@ -318,9 +318,9 @@ class CookieAuthHandler(urllib.request.HTTPCookieProcessor):
                        resp.read()
 
                if resp.status == 200:
-                       log('error', "Login failed. Are your credentials correct?")
                        del self.storage_mgr['username']
                        del self.storage_mgr['password']
+                       raise Exception("Login failed. Did you enter the correct credentials?")
                elif resp.status == 302:
                        # success
                        self.storage_mgr['username'] = username