Merge lp:~raof/apport/drm-info-fix into lp:~apport-hackers/apport/trunk

Proposed by Chris Halse Rogers
Status: Merged
Merged at revision: 1780
Proposed branch: lp:~raof/apport/drm-info-fix
Merge into: lp:~apport-hackers/apport/trunk
Diff against target: 17 lines (+6/-1)
1 file modified
apport/hookutils.py (+6/-1)
To merge this branch: bzr merge lp:~raof/apport/drm-info-fix
Reviewer Review Type Date Requested Status
Apport upstream developers Pending
Review via email: mp+28269@code.launchpad.net

Description of the change

Fix attach_drm_info when the DRM has strangely named connectors, such as mine which has “card0-HDMI Type A-1”.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'apport/hookutils.py'
2--- apport/hookutils.py 2010-06-16 13:37:11 +0000
3+++ apport/hookutils.py 2010-06-23 07:03:30 +0000
4@@ -587,7 +587,12 @@
5 for f in os.listdir(drm_dir):
6 con = os.path.join(drm_dir, f)
7 if os.path.exists(os.path.join(con, 'enabled')):
8- report['DRM.' + f] = __drm_con_info(con)
9+ # DRM can set an arbitrary string for its connector paths.
10+ # Sanitise the path before trying to attach it.
11+ connector_key = path_to_key(f)
12+ connector_key = connector_key.replace(' ', '_')
13+
14+ report['DRM.' + connector_key] = __drm_con_info(con)
15
16 #
17 # Unit test

Subscribers

People subscribed via source and target branches