mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
IGN:PRS500 driver: Fix card function to not raise an exception when no card is present
This commit is contained in:
parent
c30fb96ebf
commit
c01b8454f5
@ -794,10 +794,16 @@ class PRS500(DeviceConfig, DevicePlugin):
|
||||
def card(self, end_session=True):
|
||||
""" Return path prefix to installed card or None """
|
||||
card = None
|
||||
if self._exists("a:/")[0]:
|
||||
card = "a:"
|
||||
if self._exists("b:/")[0]:
|
||||
card = "b:"
|
||||
try:
|
||||
if self._exists("a:/")[0]:
|
||||
card = "a:"
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
if self._exists("b:/")[0]:
|
||||
card = "b:"
|
||||
except:
|
||||
pass
|
||||
return card
|
||||
|
||||
@safe
|
||||
|
Loading…
x
Reference in New Issue
Block a user