Revert "hwdb/parse_hwdb.py: open files with UTF-8 mode"
"encoding" is not a valid Python 2 keyword, and despite the hashbang this
script can be called with Python 2.
This reverts commit 115a10c58d.
This commit is contained in:
+1
-2
@@ -133,8 +133,7 @@ def convert_properties(group):
|
||||
def parse(fname):
|
||||
grammar = hwdb_grammar()
|
||||
try:
|
||||
with open(fname, 'r', encoding='UTF-8') as f:
|
||||
parsed = grammar.parseFile(f)
|
||||
parsed = grammar.parseFile(fname)
|
||||
except ParseBaseException as e:
|
||||
error('Cannot parse {}: {}', fname, e)
|
||||
return []
|
||||
|
||||
Reference in New Issue
Block a user