projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
28d3295
)
Revert "hwdb/parse_hwdb.py: open files with UTF-8 mode"
author
Martin Pitt
<martin.pitt@ubuntu.com>
Fri, 25 Nov 2016 06:59:37 +0000
(07:59 +0100)
committer
Martin Pitt
<martin.pitt@ubuntu.com>
Fri, 25 Nov 2016 06:59:37 +0000
(07:59 +0100)
"encoding" is not a valid Python 2 keyword, and despite the hashbang this
script can be called with Python 2.
This reverts commit
115a10c58d343d00b73bd9442f7ce6c294debad8
.
hwdb/parse_hwdb.py
patch
|
blob
|
history
diff --git
a/hwdb/parse_hwdb.py
b/hwdb/parse_hwdb.py
index
556b859
..
5d4c5ea
100755
(executable)
--- 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 []