From cc6c7a1caa5abc4567bcc9ffaaf4261c18c35668 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Sat, 13 Jun 2015 01:52:08 +0200 Subject: aurinfo: Fix bug with space indents creating split packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Johannes Löthberg Signed-off-by: Lukas Fleischer --- git-interface/aurinfo.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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: -- cgit v1.2.3-54-g00ecf