~ubuntu-branches/ubuntu/utopic/synaptiks/utopic

« back to all changes in this revision

Viewing changes to synaptiks/monitors/mouses.py

  • Committer: Package Import Robot
  • Author(s): Harald Sitter
  • Date: 2013-12-10 15:25:25 UTC
  • Revision ID: package-import@ubuntu.com-20131210152525-ytfmbtiybtmf11sr
Tags: 0.8.1-1ubuntu6
Add kubuntu_fix_udev_property_access.patch to fix a crash when accessing
the NAME property of mice (LP: #737856)

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
        # device.  The parent represents the actual physical device.  The name
75
75
        # may be decorated with quotation marks, which are removed for the sake
76
76
        # of a clean represenation
77
 
        return cls(device['ID_SERIAL'], device.parent['NAME'].strip('"'))
 
77
        name = device.parent.get('NAME', device.parent.get('DEVNAME')).strip('"')
 
78
        return cls(device.get('ID_SERIAL'), name)
78
79
 
79
80
 
80
81
class MouseDevicesMonitor(QObject):