Author: gnichols
Date: 2010-03-09 02:58:58 +0000 (Tue, 09 Mar 2010)
New Revision: 427
Modified:
trunk/v7/procDeviceDetector.py
Log:
568226 - USB test failed on RHEL48 with v7 R9.
Modified: trunk/v7/procDeviceDetector.py
===================================================================
--- trunk/v7/procDeviceDetector.py 2010-03-09 02:53:15 UTC (rev 426)
+++ trunk/v7/procDeviceDetector.py 2010-03-09 02:58:58 UTC (rev 427)
@@ -7,13 +7,14 @@
from v7.device import ProcDevice
from v7.deviceDetector import DeviceDetector
from v7.tags import Constants
+from v7.command import Command
class ProcDeviceDetector(DeviceDetector):
"A class for detecting devices via the /proc file system"
def __init__(self):
DeviceDetector.__init__(self, name=Constants.proc)
- self.usbPath = "/proc/bus/usbXXX/devices"
+ self.usbPath = "/proc/bus/usb/devices"
self.nextKey = None
self.__loadDevices()
@@ -25,7 +26,7 @@
# treat the file as a bunch of attrubute=value strings
# sepearated by blank lines for each device
try:
- pipe = Command(self.usbPath)
+ pipe = Command("cat " + self.usbPath)
pipe.start()
properties = dict()
while 1:
@@ -52,9 +53,8 @@
for keyvalue in keyvalues:
self.__addKeyValue(keyvalue, properties)
except Exception, e:
- if self.debug != Constants.off:
- print "Warning: could not read devices from proc"
- print e
+ print "Warning: could not read devices from proc"
+ print e
pass
def __addKeyValue(self, keyvalue, properties):
Show replies by date