mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix incorrect sub-classing of tuple
This commit is contained in:
parent
9022554d93
commit
bd0c9c3f8e
@ -109,9 +109,10 @@ _USBDevice = namedtuple('USBDevice',
|
||||
|
||||
class USBDevice(_USBDevice):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
_USBDevice.__init__(self, *args, **kwargs)
|
||||
def __new__(cls, *args, **kwargs):
|
||||
self = super(USBDevice, cls).__new__(cls, *args)
|
||||
self.busnum = self.devnum = -1
|
||||
return self
|
||||
|
||||
def __repr__(self):
|
||||
return (u'USBDevice(busnum=%s, devnum=%s, '
|
||||
|
Loading…
x
Reference in New Issue
Block a user