diff options
author | Mantas Mikulėnas <grawity@gmail.com> | 2019-05-06 12:02:36 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-05-06 14:29:36 +0200 |
commit | 9bd267159817116a472e1ab88792b1346a2ca392 (patch) | |
tree | e102cb9ce06f7f4b3345634bdc2d8af72663b292 | |
parent | c513b7646687b35543f3e5a16640807a84eb1a5b (diff) | |
download | usbutils-9bd267159817116a472e1ab88792b1346a2ca392.tar.gz |
lsusb.py: give all Usb* classes a superclass
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | lsusb.py.in | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lsusb.py.in b/lsusb.py.in index e7a57fb..9bc8e28 100644 --- a/lsusb.py.in +++ b/lsusb.py.in @@ -230,7 +230,10 @@ def find_dev(driver, usbname): return res -class UsbEndpoint: +class UsbObject: + pass + +class UsbEndpoint(UsbObject): "Container for USB endpoint info" def __init__(self, parent, fname, level): self.parent = parent @@ -268,7 +271,7 @@ class UsbEndpoint: self.ival, self.attr, self.len, self.max, cols[0]) -class UsbInterface: +class UsbInterface(UsbObject): "Container for USB interface info" def __init__(self, parent, fname, level=1): self.parent = parent @@ -321,7 +324,7 @@ class UsbInterface: strg += str(ep) return strg -class UsbDevice: +class UsbDevice(UsbObject): "Container for USB device info" def __init__(self, parent, fname, level=0): self.parent = parent |