parse_hwdb: fix to work with pyparsing 2.1.10

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!
This commit is contained in:
Martin Pitt 2016-11-30 09:20:15 +01:00
parent 2926b130b6
commit f644a6da7a

View file

@ -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))