Fix bug in determining behaviours for those using GnuPG2 binaries.
This bug caused some extra behaviours which should only be invoked if the user is using a gpg2 binary. It was caused by checking: if _util._is_gpg2: which is always true, since `_util._is_gpg2` is a function which isn't being called in this case, i.e.: >>> def foo(): return False >>> bool(foo) True So instead this should be changed to actually call `_util._is_gpg2()`, by using `gnupg.GPG.is_gpg2()` which will automatically pass in the detected binary version number.fix/44-verbose-arg
parent
5ad99acd7c
commit
69cc991938
|
@ -156,7 +156,7 @@ class GPG(GPGBase):
|
|||
self.binary_version = version_line.split('\n')[0]
|
||||
log.debug("Using GnuPG version %s" % self.binary_version)
|
||||
|
||||
if _util._is_gpg2:
|
||||
if self.is_gpg2():
|
||||
# Make GnuPG>=2.0.0-only methods public:
|
||||
self.fix_trustdb = self._fix_trustdb
|
||||
self.import_ownertrust = self._import_ownertrust
|
||||
|
|
Loading…
Reference in New Issue