diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-10-22 14:03:06 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-10-22 14:03:06 +0200 |
commit | 8124c3e12d185ed5ab0ffe269e917ec911e76a9d (patch) | |
tree | ae1da9820dbdafc442795d707120c18853607033 | |
parent | eb50412e39897a5e65e519fa64d682a994c776a4 (diff) | |
download | usbutils-8124c3e12d185ed5ab0ffe269e917ec911e76a9d.tar.gz |
lsusb.py: drop trailing space on non-hub devices
Devices that are not a hub end up with a trailing space on the line,
which is not nice. Prevent that from happening.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | lsusb.py.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lsusb.py.in b/lsusb.py.in index 00dfbdc..94c55e7 100644 --- a/lsusb.py.in +++ b/lsusb.py.in @@ -428,12 +428,12 @@ class UsbDevice(UsbObject): indent = " " * self.level name = self.fname plural = (" " if self.nointerfaces == 1 else "s") - body = "%s %02x %iIF%s [USB %s, %5s Mbps, %5s] (%s) %s" % \ + body = "%s %02x %iIF%s [USB %s, %5s Mbps, %5s] (%s)%s" % \ (colorize(1, "%04x:%04x" % (self.vid, self.pid)), self.iclass, self.nointerfaces, plural, self.usbver.strip(), self.speed, self.maxpower, colorize(2 if is_hub else 1, self.name), - colorize(2, "hub") if is_hub else "") + colorize(2, " hub") if is_hub else "") strg = "%-17s %s\n" % (indent + name, indent + body) if not (is_hub and not showhubint): if showeps: |