Skip to content

Commit ddf4283

Browse files
committed
Fix #249: Handle fetching GPG version when not the first item in the configuration.
1 parent fcc8ebe commit ddf4283

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.rst

+2
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ Change log
7777

7878
Released: Not yet
7979

80+
* Fix #249: Handle fetching GPG version when not the first item in the configuration.
81+
8082

8183
0.5.4
8284
-----

gnupg.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,7 @@ def fpr(self, args):
10531053
self.fingerprint = self.fingerprint or args[9]
10541054

10551055

1056-
VERSION_RE = re.compile(r'^cfg:version:(\d+(\.\d+)*)'.encode('ascii'))
1056+
VERSION_RE = re.compile(r'\bcfg:version:(\d+(\.\d+)*)'.encode('ascii'))
10571057
HEX_DIGITS_RE = re.compile(r'[0-9a-f]+$', re.I)
10581058
PUBLIC_KEY_RE = re.compile(r'gpg: public key is (\w+)')
10591059

@@ -1154,7 +1154,7 @@ def __init__(self,
11541154
self._collect_output(p, result, stdin=p.stdin)
11551155
if p.returncode != 0: # pragma: no cover
11561156
raise ValueError('Error invoking gpg: %s: %s' % (p.returncode, result.stderr))
1157-
m = VERSION_RE.match(result.data)
1157+
m = VERSION_RE.search(result.data)
11581158
if not m: # pragma: no cover
11591159
self.version = None
11601160
else:

0 commit comments

Comments
 (0)