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:
Martin Pitt 2016-11-25 07:59:37 +01:00
parent 28d329571a
commit 2f08ccc32e

View file

@ -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 []