From bd20421195bfc73789494759c4a43617fdc66ce6 Mon Sep 17 00:00:00 2001 From: Theo Chatzimichos Date: Wed, 2 Mar 2011 09:39:56 -0800 Subject: [PATCH] grabdict: allow inline comments --- pym/portage/util/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pym/portage/util/__init__.py b/pym/portage/util/__init__.py index 55ffcfc8a..f31f33d49 100644 --- a/pym/portage/util/__init__.py +++ b/pym/portage/util/__init__.py @@ -314,6 +314,13 @@ def grabdict(myfilename, juststrings=0, empty=0, recursive=0, incremental=1): if x[0] == "#": continue myline=x.split() + mylinetemp = [] + for item in myline: + if not item.startswith('#'): + mylinetemp.append(item) + else: + break + myline = mylinetemp if len(myline) < 2 and empty == 0: continue if len(myline) < 1 and empty == 1: -- 2.26.2