diff options
author | Johannes Löthberg <johannes@kyriasis.com> | 2015-06-13 01:52:08 +0200 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2015-06-14 17:58:55 +0200 |
commit | cc6c7a1caa5abc4567bcc9ffaaf4261c18c35668 (patch) | |
tree | a148786715ef725b8dc0097c8deaa465831f98e8 /git-interface | |
parent | 5fb7a74e23b2059ec0c1acb72d8d804adbf05c52 (diff) | |
download | aurweb-cc6c7a1caa5abc4567bcc9ffaaf4261c18c35668.tar.xz |
aurinfo: Fix bug with space indents creating split packages
If a .SRCINFO line doesn't start with a tab, check if the key is pkgname
before adding it as a package.
Fixes a bug where if you have accidentally gotten a line indented with
spaces, from that line forward it will think it is a split package,
instead of erroring out.
Reported-by: Raansu <Gero3977@gmail.com>
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'git-interface')
-rw-r--r-- | git-interface/aurinfo.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/git-interface/aurinfo.py b/git-interface/aurinfo.py index d9b9372..86d0705 100644 --- a/git-interface/aurinfo.py +++ b/git-interface/aurinfo.py @@ -132,8 +132,12 @@ def ParseAurinfoFromIterable(iterable, ecatcher=None): if key == 'pkgbase': current_package = aurinfo.SetPkgbase(value) - else: + elif key == 'pkgname': current_package = aurinfo.AddPackage(value) + else: + ecatcher.Catch(lineno, 'unexpected new section not starting ' + 'with \'pkgname\' found') + continue else: # package attribute if current_package is None: |