Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Mar 21, 2017
1 parent 8fadf72 commit 6a09595
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/calibre/devices/mtp/unix/driver.py
Expand Up @@ -228,7 +228,14 @@ def open(self, connected_device, library_uuid):
# 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,'
Expand Down

0 comments on commit 6a09595

Please sign in to comment.