From 2a06103eba569de9a01448cb4fbe0b8e81788c97 Mon Sep 17 00:00:00 2001 From: croneter Date: Sun, 1 Aug 2021 15:41:58 +0200 Subject: [PATCH] Improve logging for converting Unix timestamps --- resources/lib/timing.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/lib/timing.py b/resources/lib/timing.py index 3ca7ee6d..b0d0f7bb 100644 --- a/resources/lib/timing.py +++ b/resources/lib/timing.py @@ -33,10 +33,11 @@ def unix_date_to_kodi(unix_kodi_time): """ try: return strftime('%Y-%m-%d %H:%M:%S', localtime(float(unix_kodi_time))) - except: - LOG.error('Received an illegal timestamp from Plex: %s. ' + except Exception as exception: + LOG.error(exception) + LOG.error('Received an illegal timestamp from Plex: %s, type %s. ' 'Using 1970-01-01 12:00:00', - unix_kodi_time) + unix_kodi_time, type(unix_kodi_time)) return '1970-01-01 12:00:00'