Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 601561 Details for
Bug 843608
lid test should not use HAL
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
procDeviceDetector patch for check /proc/bus/input for devices
procDeviceDetector.patch (text/plain), 2.03 KB, created by
Greg Nichols
on 2012-07-31 18:27:38 UTC
(
hide
)
Description:
procDeviceDetector patch for check /proc/bus/input for devices
Filename:
MIME Type:
Creator:
Greg Nichols
Created:
2012-07-31 18:27:38 UTC
Size:
2.03 KB
patch
obsolete
>Index: procDeviceDetector.py >=================================================================== >--- procDeviceDetector.py (revision 1160) >+++ procDeviceDetector.py (working copy) >@@ -11,22 +11,25 @@ > > class ProcDeviceDetector(DeviceDetector): > "A class for detecting devices via the /proc file system" >+ # some well-known paths into proc >+ inputBusPath = "/proc/bus/input/devices" > >- def __init__(self): >+ def __init__(self, path=None): > DeviceDetector.__init__(self, name=Constants.proc) >- self.usbPath = "/proc/bus/usb/devices" > self.nextKey = None >+ self.devices = None >+ >+ def loadDevices(self, path): >+ self.path = path >+ self.devices = list() > self.__loadDevices() >+ return self.devices > > def __loadDevices(self): >- self.devices = list() >- self.__loadUsbDevices() >- >- def __loadUsbDevices(self): > # treat the file as a bunch of attrubute=value strings >- # sepearated by blank lines for each device >+ # seperated by blank lines for each device > try: >- pipe = Command("cat " + self.usbPath) >+ pipe = Command("cat " + self.path) > pipe.start() > properties = dict() > while 1: >@@ -83,12 +86,18 @@ > > > def getDevices(self): >- self.__loadDevices() > return self.devices >+ >+ def getDevice(self, udi): >+ if self.devices: >+ for device in self.devices: >+ if device.hasPropertyValue(udi): >+ return device >+ # otherwise >+ return None > > > def dump(self): >- self.__loadDevices() > for device in self.devices: > print device.getProperties() > >@@ -124,5 +133,6 @@ > > > if __name__ == "__main__": >- detector=ProcDeviceDetector("/proc/bus/usb/devices") >+ detector=ProcDeviceDetector() >+ detector.loadDevices("/proc/bus/input/devices") > print detector.dump()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 843608
: 601561 |
601562