mirror of
https://github.com/Screenly/Anthias.git
synced 2026-05-07 14:55:18 -04:00
exception handling
This commit is contained in:
13
viewer.py
13
viewer.py
@@ -222,11 +222,14 @@ def view_video(uri, duration):
|
||||
run = sh.Command(player_args[0])(*player_args[1:], **player_kwargs)
|
||||
|
||||
browser_clear(force=True)
|
||||
while run.process.alive:
|
||||
watchdog()
|
||||
sleep(1)
|
||||
if run.exit_code == 124:
|
||||
logging.error('omxplayer timed out')
|
||||
try:
|
||||
while run.process.alive:
|
||||
watchdog()
|
||||
sleep(1)
|
||||
if run.exit_code == 124:
|
||||
logging.error('omxplayer timed out')
|
||||
except sh.ErrorReturnCode_1:
|
||||
logging.info('Resource URI is not correct, remote host is not responding or request was rejected.')
|
||||
|
||||
|
||||
def check_update():
|
||||
|
||||
Reference in New Issue
Block a user