diff options
author | Michael Vogt <mvo@ubuntu.com> | 2014-09-03 10:25:26 +0200 |
---|---|---|
committer | Michael Vogt <mvo@ubuntu.com> | 2014-09-03 10:25:26 +0200 |
commit | 7262bab8e520db7e326c219c24e996e20f91e906 (patch) | |
tree | f5ffac43239ade26d6a68fa5e6bc252530ab17be | |
parent | 5960003fc970480bd48b0cc1c0f8b5ed80af7dac (diff) | |
download | python-apt-7262bab8e520db7e326c219c24e996e20f91e906.tar.gz |
fix tests
-rw-r--r-- | apt/auth.py | 6 | ||||
-rw-r--r-- | apt/debfile.py | 2 | ||||
-rw-r--r-- | python/tag.cc | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/apt/auth.py b/apt/auth.py index b8089d0c..74fea10b 100644 --- a/apt/auth.py +++ b/apt/auth.py @@ -192,9 +192,11 @@ def _add_key_from_keyserver(keyid, keyserver, tmp_keyring_dir): # what gnupg is using) signing_key_fingerprint = keyid.replace("0x", "").upper() if got_fingerprint != signing_key_fingerprint: + # make the error match what gnupg >= 1.4.18 will output when + # it checks the key itself before importing it raise AptKeyError( - "Fingerprints do not match, not importing: '%s' != '%s'" % ( - signing_key_fingerprint, got_fingerprint)) + "recv from '%s' failed for '%s'" % ( + keyserver, signing_key_fingerprint)) # finally add it add_key_from_file(tmp_export_keyring) diff --git a/apt/debfile.py b/apt/debfile.py index 2528fd8a..1f93b7bb 100644 --- a/apt/debfile.py +++ b/apt/debfile.py @@ -721,7 +721,7 @@ class DscSrcPackage(DebPackage): # we only care about the stanza with the "Format:" tag, the # rest is gpg signature noise. we should probably have # bindings for apts OpenMaybeClearsignedFile() - if not "Format" in sec: + if "Format" not in sec: continue for tag in depends_tags: if tag not in sec: diff --git a/python/tag.cc b/python/tag.cc index 8f483467..8fb0a78e 100644 --- a/python/tag.cc +++ b/python/tag.cc @@ -344,7 +344,7 @@ static PyObject *TagFileNext(PyObject *Self) Obj.Section->Data = new char[Stop-Start+2]; snprintf(Obj.Section->Data, Stop-Start+2, "%s\n", Start); // Rescan it - if(Obj.Section->Object.Scan(Obj.Section->Data, Stop-Start) == false) + if(Obj.Section->Object.Scan(Obj.Section->Data, Stop-Start+2) == false) return HandleErrors(NULL); Py_INCREF(Obj.Section); |