Skip to content
Snippets Groups Projects
Commit e0556516 authored by David Trattnig's avatar David Trattnig
Browse files

Fix and verbose exception handling.

parent 76838c64
No related branches found
No related tags found
No related merge requests found
......@@ -154,7 +154,7 @@ class AuraCalendarService(threading.Thread):
self.queue.put(result)
except Exception as e:
# Release the mutex
self.logger.warning("Fetching aborted due to: %s" % str(e))
self.logger.warning("Fetching aborted due to: %s" % str(e), e)
self.queue.put("fetching_aborted " + str(e))
# terminate the thread
......@@ -255,10 +255,9 @@ class AuraCalendarService(threading.Thread):
entry_db.artificial_playlist_id = playlist_db.artificial_id
entry_db.entry_num = entry_num
if "file" in entry and duration in entry["file"]:
if "file" in entry and "duration" in entry["file"]:
# Convert nano-seconds to seconds
duration = int(float(entry["file"]["duration"]) / 1000000000)
# except Exception:
else:
# No duration means it's playing until the end of the schedule
self.logger.debug("Missing duration - setting duration of entry to end-of-schedule")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment