Bug fix
authorJakob <jakob@jcornell.net>
Sun, 1 Dec 2019 00:11:57 +0000 (18:11 -0600)
committerJakob <jakob@jcornell.net>
Sun, 1 Dec 2019 00:11:57 +0000 (18:11 -0600)
auth.py

diff --git a/auth.py b/auth.py
index 6374b11bf204ad9384dc0b42368bdd2c001a9b3d..e27cbd7db5e62706e079c11d7c82c719afb61132 100644 (file)
--- a/auth.py
+++ b/auth.py
@@ -278,13 +278,13 @@ class CookieAuthHandler(urllib.request.HTTPCookieProcessor):
 
                # Obfuscate password to prevent accidental discovery
                if {'username', 'password'} <= self.storage_mgr.keys():
-                       username = storage_mgr['username']
-                       password = decode(storage_mgr['password'])
+                       username = self.storage_mgr['username']
+                       password = decode(self.storage_mgr['password'])
                else:
                        username = self.ui.ask_username()
                        password = self.ui.ask_password()
-                       storage_mgr['username'] = username
-                       storage_mgr['password'] = encode(password)
+                       self.storage_mgr['username'] = username
+                       self.storage_mgr['password'] = encode(password)
 
                url = self.bb_root.host + str(self.bb_root.path)
                with self.parent.open(url) as resp: