diff options
author | Michał Górny <mgorny@gentoo.org> | 2018-02-08 17:49:15 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2018-02-08 17:49:15 +0100 |
commit | 3aeadeb4587d36e7b3cfc30fd970a68b5996584e (patch) | |
tree | 0944037c438b7cf69644b674a0aea0ed38175d90 | |
parent | cb027a30fd9ab3a8430c8a225b520c73092a3bd5 (diff) | |
download | gemato-3aeadeb4587d36e7b3cfc30fd970a68b5996584e.tar.gz |
openpgp: Fix duplicate message in key import/refresh exceptions
-rw-r--r-- | gemato/openpgp.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gemato/openpgp.py b/gemato/openpgp.py index 9d10d33..b4f6a27 100644 --- a/gemato/openpgp.py +++ b/gemato/openpgp.py @@ -217,14 +217,12 @@ disable-scdaemon def import_key(self, keyfile): exitst, out, err = self._spawn_gpg(['--import'], keyfile.read()) if exitst != 0: - raise gemato.exceptions.OpenPGPKeyImportError( - 'Unable to import key: {}'.format(err.decode('utf8'))) + raise gemato.exceptions.OpenPGPKeyImportError(err.decode('utf8')) def refresh_keys(self): exitst, out, err = self._spawn_gpg(['--refresh-keys'], '') if exitst != 0: - raise gemato.exceptions.OpenPGPKeyRefreshError( - 'Unable to refresh keys: {}'.format(err.decode('utf8'))) + raise gemato.exceptions.OpenPGPKeyRefreshError(err.decode('utf8')) @property def home(self): |