1. Kang Zhang
  2. Python Keyring Lib


Maciej Sitarz  committed 1cacbaa

Start error message with capital letter

  • Participants
  • Parent commits b212793
  • Branches default

Comments (0)

Files changed (3)

File keyring/backends/Gnome.py

View file
  • Ignore whitespace
                 password, True)
         except gnomekeyring.CancelledError:
             # The user pressed "Cancel" when prompted to unlock their keyring.
-            raise PasswordSetError("cancelled by user")
+            raise PasswordSetError("Cancelled by user")
     def delete_password(self, service, username):
         """Delete the password for the username of the service.
         except gnomekeyring.NoMatchError:
             raise PasswordDeleteError("Password not found")
         except gnomekeyring.CancelledError:
-            raise PasswordDeleteError("cancelled by user")
+            raise PasswordDeleteError("Cancelled by user")
     def _safe_string(self, source, encoding='utf-8'):
         """Convert unicode to string as gnomekeyring barfs on unicode"""

File keyring/backends/Google.py

View file
  • Ignore whitespace
     def _del_entry(self, keyring_dict, service, username):
         service_entries = keyring_dict.get(service)
         if not service_entries:
-            raise errors.PasswordDeleteError("no matching service")
+            raise errors.PasswordDeleteError("No matching service")
             del service_entries[username]
         except KeyError:
-            raise errors.PasswordDeleteError("not found")
+            raise errors.PasswordDeleteError("Not found")
         if not service_entries:
             del keyring_dict[service]

File keyring/backends/pyfs.py

View file
  • Ignore whitespace
             self.config.remove_option(service, username)
         except configparser.NoSectionError:
-            raise errors.PasswordDeleteError('not found')
+            raise errors.PasswordDeleteError('Password not found')
         config_file = self._open('w')