1. Kang Zhang
  2. Python Keyring Lib

Commits

Maciej Sitarz  committed abcb634

Corrected delete exception message

  • Participants
  • Parent commits 07c1942
  • Branches fix_kwallet_delete

Comments (0)

Files changed (3)

File keyring/backends/Gnome.py

View file
                 gnomekeyring.item_delete_sync(current['keyring'],
                                               current['item_id'])
         except gnomekeyring.NoMatchError:
-            raise PasswordDeleteError("can't found the password")
+            raise PasswordDeleteError("Password not found")
         except gnomekeyring.CancelledError:
             raise PasswordDeleteError("cancelled by user")
 

File keyring/backends/file.py

View file
         if os.path.exists(self.file_path):
             config.read(self.file_path)
         if not config.remove_section(service):
-            raise PasswordDeleteError("can't found the password")
+            raise PasswordDeleteError("Password not found")
         # update the file
         config_file = open(self.file_path, 'w')
         config.write(config_file)

File keyring/backends/kwallet.py

View file
         key = username + '@' + service
         wallet = open_kwallet()
         if wallet.keyDoesNotExist(wallet.walletName(), 'Python', key):
-            raise PasswordDeleteError("can't found the password")
+            raise PasswordDeleteError("Password not found")
         wallet.removeEntry(key)