From 6a0959572cef66152ba5ada687f555bf0497341e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 21 Mar 2017 09:03:39 +0530 Subject: [PATCH] ... --- src/calibre/devices/mtp/unix/driver.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/calibre/devices/mtp/unix/driver.py b/src/calibre/devices/mtp/unix/driver.py index 7f65905c77..4f48c40099 100644 --- a/src/calibre/devices/mtp/unix/driver.py +++ b/src/calibre/devices/mtp/unix/driver.py @@ -228,7 +228,14 @@ class MTP_DEVICE(MTPDeviceBase): # the user to allow access. Apparently what happens is # that when the user clicks allow, the device disconnects # and re-connects as a new device. - name = self.dev.friendly_name or connected_device.manufacturer or _('Unnamed device') + name = self.dev.friendly_name or '' + if not name: + if connected_device.manufacturer: + name = connected_device.manufacturer + if connected_device.product: + name = name and (name + ' ') + name += connected_device.product + name = name or _('Unnamed device') raise OpenActionNeeded(name, _( 'The device {0} is not allowing connections.' ' Unlock the screen on the {0}, tap "Allow" on any connection popup message you see,'