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):
|
def card(self, end_session=True):
|
||||||
""" Return path prefix to installed card or None """
|
""" Return path prefix to installed card or None """
|
||||||
card = None
|
card = None
|
||||||
|
try:
|
||||||
if self._exists("a:/")[0]:
|
if self._exists("a:/")[0]:
|
||||||
card = "a:"
|
card = "a:"
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
try:
|
||||||
if self._exists("b:/")[0]:
|
if self._exists("b:/")[0]:
|
||||||
card = "b:"
|
card = "b:"
|
||||||
|
except:
|
||||||
|
pass
|
||||||
return card
|
return card
|
||||||
|
|
||||||
@safe
|
@safe
|
||||||
|
Loading…
x
Reference in New Issue
Block a user