]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
parse_hwdb: fix to work with pyparsing 2.1.10
authorMartin Pitt <martin.pitt@ubuntu.com>
Wed, 30 Nov 2016 08:20:15 +0000 (09:20 +0100)
committerMartin Pitt <martin.pitt@ubuntu.com>
Wed, 30 Nov 2016 08:20:15 +0000 (09:20 +0100)
pyparsing 2.1.10 fixed the handling of LineStart to really just apply to line
starts and not ignore whitespace and comments any more. Adjust EMPTYLINE to
this.

Many thanks to Paul McGuire for pointing this out!

hwdb/parse_hwdb.py

index 5d4c5ea64df1babca4f8128911a409168bc70209..5856d12af7f84d482e94fa2bb07a9c6d1cd663a1 100755 (executable)
@@ -56,7 +56,7 @@ except ImportError:
     lru_cache = lambda: (lambda f: f)
 
 EOL = LineEnd().suppress()
-EMPTYLINE = LineStart() + LineEnd()
+EMPTYLINE = LineEnd()
 COMMENTLINE = pythonStyleComment + EOL
 INTEGER = Word(nums)
 REAL = Combine((INTEGER + Optional('.' + Optional(INTEGER))) ^ ('.' + INTEGER))