Merge pull request #1401 from auouymous/catch-sync-device-open-exceptions

Catch unknown sync exceptions when opening device and show error.
This commit is contained in:
Eric Le Lay 2022-09-24 19:20:52 +02:00 committed by GitHub
commit 5825f51183
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 4 deletions

View File

@ -105,14 +105,22 @@ class gPodderSyncUI(object):
done_callback()
return
if not device.open():
try:
if not device.open():
self._show_message_cannot_open()
if done_callback:
done_callback()
return
else:
# Only set if device is configured and opened successfully
self.device = device
except Exception as err:
logger.error('opening destination %s failed with %s',
device.destination.get_uri(), err.message)
self._show_message_cannot_open()
if done_callback:
done_callback()
return
else:
# Only set if device is configured and opened successfully
self.device = device
if episodes is None:
force_played = False