diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2016-11-25 07:59:37 +0100 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2016-11-25 07:59:37 +0100 |
commit | 2f08ccc32e5543fc73ac6c9d301d6e5a427dddf7 (patch) | |
tree | 2dec3578f74b7ac8daf87693f87dafde26083ba0 /hwdb | |
parent | Merge pull request #4734 from whot/hwdb-updates (diff) | |
download | systemd-2f08ccc32e5543fc73ac6c9d301d6e5a427dddf7.tar.gz systemd-2f08ccc32e5543fc73ac6c9d301d6e5a427dddf7.tar.bz2 systemd-2f08ccc32e5543fc73ac6c9d301d6e5a427dddf7.zip |
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 115a10c58d343d00b73bd9442f7ce6c294debad8.
Diffstat (limited to 'hwdb')
-rwxr-xr-x | hwdb/parse_hwdb.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hwdb/parse_hwdb.py b/hwdb/parse_hwdb.py index 556b85919..5d4c5ea64 100755 --- a/hwdb/parse_hwdb.py +++ b/hwdb/parse_hwdb.py @@ -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 [] |