1. Kyle Stark
  2. Python Keyring Lib CryptedFileKeyring fix


Kyle Stark  committed 8881c7d

Change CryptedFileKeyring to allow successful unlock instead of forced init

  • Participants
  • Parent commits cae36df
  • Branches default

Comments (0)

Files changed (1)

File keyring/backend.py

View file
     def keyring_key(self):
         # _unlock or _init_file will set the key or raise an exception
-        self._check_file() and self._unlock() or self._init_file()
+        if self._check_file():
+            self._unlock()
+        else:
+            self._init_file()
         return self.keyring_key
     def _get_new_password(self):