diff options
| author | Michael Vogt <mvo@ubuntu.com> | 2014-09-03 09:16:56 +0200 |
|---|---|---|
| committer | Michael Vogt <mvo@ubuntu.com> | 2014-09-03 09:16:56 +0200 |
| commit | 5960003fc970480bd48b0cc1c0f8b5ed80af7dac (patch) | |
| tree | 16c317caba6e015fc38d133179749a2a8d5f1b66 /apt | |
| parent | ea440c589db54ac01e79ad8d09a9976e77f15f23 (diff) | |
| download | python-apt-5960003fc970480bd48b0cc1c0f8b5ed80af7dac.tar.gz | |
read all tags from a dsc file and improve tests
Diffstat (limited to 'apt')
| -rw-r--r-- | apt/debfile.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apt/debfile.py b/apt/debfile.py index 5c6de3c7..2528fd8a 100644 --- a/apt/debfile.py +++ b/apt/debfile.py @@ -718,6 +718,11 @@ class DscSrcPackage(DebPackage): tagfile = apt_pkg.TagFile(fobj) try: for sec in tagfile: + # 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: + continue for tag in depends_tags: if tag not in sec: continue @@ -730,14 +735,9 @@ class DscSrcPackage(DebPackage): self.pkgname = sec['Source'] if 'Binary' in sec: self.binaries = sec['Binary'].split(', ') - # read some more tags - for tag in ('Version', 'Files', 'Checksum-Sha1'): + for tag in sec.keys(): if tag in sec: self._sections[tag] = sec[tag] - # we only care about the stanza with the "Format:" tag, the - # rest is gpg signature noise - if 'Format' in sec: - break finally: del tagfile fobj.close() |
