Skip to content

Commit

Permalink
CryptedFileKeyring is a BasicFileKeyring again (though it still overr…
Browse files Browse the repository at this point in the history
…ides get_password and set_password and writes an encrypted file)
  • Loading branch information
jaraco committed Jun 10, 2012
1 parent e59e4cc commit a769426
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions keyring/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ def supported(self):
"""
return 0

class CryptedFileKeyring(KeyringBackend):
class CryptedFileKeyring(BasicFileKeyring):
"""PyCrypto File Keyring"""

# a couple constants
Expand All @@ -442,21 +442,6 @@ class CryptedFileKeyring(KeyringBackend):

filename = 'crypted_pass.cfg'

@properties.NonDataProperty
def file_path(self):
"""
The path to the file where passwords are stored. This property
may be overridden by the subclass or at the instance level.
"""
return os.path.join(keyring.util.platform.data_root(), self.filename)

def _relocate_file(self):
old_location = os.path.join(os.path.expanduser('~'), self.filename)
new_location = self.file_path
keyring.util.loc_compat.relocate_file(old_location, new_location)
# disable this function - it only needs to be run once
self._relocate_file = lambda: None

def supported(self):
"""Applicable for all platforms, but not recommend"
"""
Expand Down

0 comments on commit a769426

Please # to comment.