mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Avoid pointless traceback if vendor string is empty in user defined driver
This commit is contained in:
parent
50f6f9ea8f
commit
b1c0c59a2b
@ -95,6 +95,7 @@ class USER_DEFINED(USBMS):
|
||||
def do_delayed_plugin_initialization(self):
|
||||
try:
|
||||
e = self.settings().extra_customization
|
||||
if e[self.OPT_USB_VENDOR_ID]:
|
||||
self.VENDOR_ID = int(e[self.OPT_USB_VENDOR_ID], 16)
|
||||
self.PRODUCT_ID = int(e[self.OPT_USB_PRODUCT_ID], 16)
|
||||
self.BCD = [int(e[self.OPT_USB_REVISION_ID], 16)]
|
||||
@ -151,5 +152,3 @@ class USER_DEFINED(USBMS):
|
||||
names['carda'] = main
|
||||
|
||||
return names
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user