From: Jakob Date: Wed, 4 Dec 2019 05:21:56 +0000 (-0600) Subject: Raise exception on bad login credentials X-Git-Url: https://jcornell.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=0cbc5982e25d3f5daaf3e8bcdfdd86b988de4256;p=bb-sync-api.git Raise exception on bad login credentials --- diff --git a/auth.py b/auth.py index eecafd7..b99719d 100644 --- 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