5d6eedd
From d30213c50db935f63987447d44d637bc9a00bf71 Mon Sep 17 00:00:00 2001
03e93e2
From: Martin Pitt <martin.pitt@ubuntu.com>
03e93e2
Date: Wed, 30 Nov 2016 09:20:15 +0100
03e93e2
Subject: [PATCH] parse_hwdb: fix to work with pyparsing 2.1.10
03e93e2
03e93e2
pyparsing 2.1.10 fixed the handling of LineStart to really just apply to line
03e93e2
starts and not ignore whitespace and comments any more. Adjust EMPTYLINE to
03e93e2
this.
03e93e2
03e93e2
Many thanks to Paul McGuire for pointing this out!
03e93e2
03e93e2
(cherry picked from commit f644a6da7a6f11d20116842e2ce1c7e9c0b0ad64)
03e93e2
---
03e93e2
 hwdb/parse_hwdb.py | 2 +-
03e93e2
 1 file changed, 1 insertion(+), 1 deletion(-)
03e93e2
03e93e2
diff --git a/hwdb/parse_hwdb.py b/hwdb/parse_hwdb.py
03e93e2
index 5d4c5ea64d..5856d12af7 100755
03e93e2
--- a/hwdb/parse_hwdb.py
03e93e2
+++ b/hwdb/parse_hwdb.py
03e93e2
@@ -56,7 +56,7 @@ except ImportError:
03e93e2
     lru_cache = lambda: (lambda f: f)
03e93e2
 
03e93e2
 EOL = LineEnd().suppress()
03e93e2
-EMPTYLINE = LineStart() + LineEnd()
03e93e2
+EMPTYLINE = LineEnd()
03e93e2
 COMMENTLINE = pythonStyleComment + EOL
03e93e2
 INTEGER = Word(nums)
03e93e2
 REAL = Combine((INTEGER + Optional('.' + Optional(INTEGER))) ^ ('.' + INTEGER))