python-gnupg/gnupg
Isis Lovecruft 906b1a7142
Fix class attribute side effects between instances of ImportResult.
This fixes an issue reported by @adulau on Github where importing KeyA
and asking for the ``ImportResult.fingerprints`` would list KeyA's
fingerprints, and then importing KeyB and asking for the
``ImportResult.fingerprints`` would list both KeyA and KeyB's
fingerprints.

This was caused by a side effect resulting from the
``ImportResult.fingerprints`` being a class-level attribute, which gets
modified by the first call to ``gnupg.GPG.import_key()``, causing later
instances of ``ImportResult`` to retain the side effect. This commit
causes the ``ImportResult`` class to be indempotent under sequential
composition calls to ``gnupg.GPG.import_keys()``, ultimately resulting
in listing, upon each key import attempt, only the fingerprints of the
keys which were listed *that* time.

 * FIXES Issue #81
   https://github.com/isislovecruft/python-gnupg/issues/81
2014-11-27 00:51:55 +00:00
..
test Remove expectation for UnicodeDecodeError in a unittest. 2014-11-19 03:46:44 +00:00
__init__.py fix sphinx errors&warnings; some pep8 2013-10-14 01:24:17 -03:00
_ansistrm.py Change LICENSE to GPLv3+, after discussion with intrigeri. 2013-07-27 19:27:53 +00:00
_logger.py more py2.6 fixes 2014-04-23 14:49:24 +02:00
_meta.py Use process uids and usernames on Unix and Windows respectively. 2014-11-27 00:03:27 +00:00
_parsers.py Fix class attribute side effects between instances of ImportResult. 2014-11-27 00:51:55 +00:00
_trust.py properly pass argument during trustdb repair 2014-10-02 04:56:56 -05:00
_util.py Use process uids and usernames on Unix and Windows respectively. 2014-11-27 00:03:27 +00:00
_version.py Change versioneer parameters in gnupg/_version.py to match setup.py. 2014-11-19 21:44:53 +00:00
copyleft.py Change LICENSE to GPLv3+, after discussion with intrigeri. 2013-07-27 19:27:53 +00:00
gnupg.py Merge remote-tracking branch 'meskio/fix_list_sigs' into develop 2014-11-26 23:38:28 +00:00