apport-hackers team mailing list archive
-
apport-hackers team
-
Mailing list archive
-
Message #00183
[Merge] lp:~cmiller/apport/attach_drm into lp:apport
Chad Miller has proposed merging lp:~cmiller/apport/attach_drm into lp:apport.
Requested reviews:
Apport upstream developers (apport-hackers)
Related bugs:
Bug #1425254 in Apport: "apport hookutils.attach_drm assumes unicode, crashes"
https://bugs.launchpad.net/apport/+bug/1425254
For more details, see:
https://code.launchpad.net/~cmiller/apport/attach_drm/+merge/250831
--
Your team Apport upstream developers is requested to review the proposed merge of lp:~cmiller/apport/attach_drm into lp:apport.
=== modified file 'apport/hookutils.py'
--- apport/hookutils.py 2015-02-10 11:50:59 +0000
+++ apport/hookutils.py 2015-02-24 19:33:57 +0000
@@ -838,14 +838,14 @@
path = os.path.join(con, f)
if f == 'uevent' or not os.path.isfile(path):
continue
- val = open(path).read().strip()
+ val = open(path, "rb").read().strip()
# format some well-known attributes specially
if f == 'modes':
- val = val.replace('\n', ' ')
+ val = val.replace(b'\n', b' ')
if f == 'edid':
val = base64.b64encode(val)
f += '-base64'
- info += '%s: %s\n' % (f, val)
+ info += '%s: %s\n' % (f, val.decode("latin1"))
return info
Follow ups