[aur-dev] [PATCH 1/2] aurinfo: Allow lines starting with spaces
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> --- git-interface/aurinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-interface/aurinfo.py b/git-interface/aurinfo.py index 201f864..dfee3c1 100644 --- a/git-interface/aurinfo.py +++ b/git-interface/aurinfo.py @@ -121,7 +121,7 @@ def ParseAurinfoFromIterable(iterable, ecatcher=None): current_package = None continue - if not line.startswith('\t'): + if not (line.startswith('\t') or line.startswith(' ')): # start of new package try: key, value = map(str.strip, line.split('=', 1)) -- 2.5.0
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> --- git-interface/aurinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-interface/aurinfo.py b/git-interface/aurinfo.py index dfee3c1..b286316 100644 --- a/git-interface/aurinfo.py +++ b/git-interface/aurinfo.py @@ -194,7 +194,7 @@ if __name__ == '__main__': action, filename = sys.argv[1:3] if action == 'parse': - aurinfo = ParseAurinfo() + aurinfo = ParseAurinfo(filename) for pkgname in aurinfo.GetPackageNames(): print(">>> merged package: {:s}".format(pkgname)) pp.pprint(aurinfo.GetMergedPackage(pkgname)) -- 2.5.0
On Sat, 01 Aug 2015 at 18:16:46, Johannes Löthberg wrote:
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> --- git-interface/aurinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-interface/aurinfo.py b/git-interface/aurinfo.py index 201f864..dfee3c1 100644 --- a/git-interface/aurinfo.py +++ b/git-interface/aurinfo.py @@ -121,7 +121,7 @@ def ParseAurinfoFromIterable(iterable, ecatcher=None): current_package = None continue
- if not line.startswith(' '): + if not (line.startswith(' ') or line.startswith(' ')): [...]
I would prefer to not rely on any formatting (leading whitespace in particular). Will apply this as a hotfix, we can still improve the .SRCINFO parser later. Maybe we can switch to using your Python module in 4.1.0?
participants (2)
-
Johannes Löthberg
-
Lukas Fleischer