Fix a regression that broke connecting to MTP devices on macOS/Linux

Fixes #1825542 [Since 3.40.{0,1} Onyx Boox (mtp device) is not detected](https://bugs.launchpad.net/calibre/+bug/1825542)
This commit is contained in:
Kovid Goyal 2019-04-20 07:27:58 +05:30
parent 92a8ef3240
commit e94ac035b0
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -167,7 +167,7 @@ class MTP_DEVICE(MTPDeviceBase):
@synchronous
def create_device(self, connected_device):
d = connected_device
man, prod = d.manufacturer, d.prod
man, prod = d.manufacturer, d.product
if ispy3:
man = force_unicode(man, 'utf-8') if isinstance(man, bytes) else man
prod = force_unicode(prod, 'utf-8') if isinstance(prod, bytes) else prod