← Back to team overview

apport-hackers team mailing list archive

[Merge] lp:~raof/apport/drm-info-fix into lp:apport

 

Chris Halse Rogers has proposed merging lp:~raof/apport/drm-info-fix into lp:apport.

Requested reviews:
  Apport upstream developers (apport-hackers)
Related bugs:
  #597558 attach_drm_info falls over with weird DRM connector names
  https://bugs.launchpad.net/bugs/597558


Fix attach_drm_info when the DRM has strangely named connectors, such as mine which has “card0-HDMI Type A-1”.
-- 
https://code.launchpad.net/~raof/apport/drm-info-fix/+merge/28269
Your team Apport upstream developers is requested to review the proposed merge of lp:~raof/apport/drm-info-fix into lp:apport.
=== modified file 'apport/hookutils.py'
--- apport/hookutils.py	2010-06-16 13:37:11 +0000
+++ apport/hookutils.py	2010-06-23 07:03:30 +0000
@@ -587,7 +587,12 @@
     for f in os.listdir(drm_dir):
         con = os.path.join(drm_dir, f)
         if os.path.exists(os.path.join(con, 'enabled')):
-            report['DRM.' + f] = __drm_con_info(con)
+            # DRM can set an arbitrary string for its connector paths.
+            # Sanitise the path before trying to attach it.
+            connector_key = path_to_key(f)
+            connector_key = connector_key.replace(' ', '_')
+            
+            report['DRM.' + connector_key] = __drm_con_info(con)
 
 #
 # Unit test


Follow ups