From 965b8089f1d8b58f4201618d0dbd15a77900d003 Mon Sep 17 00:00:00 2001 From: Ruud Date: Sun, 22 Feb 2015 18:07:43 +0100 Subject: [PATCH] Don't error out on empty date --- couchpotato/core/_base/updater/main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/_base/updater/main.py b/couchpotato/core/_base/updater/main.py index 27fbd8bf12..bdba1391fe 100644 --- a/couchpotato/core/_base/updater/main.py +++ b/couchpotato/core/_base/updater/main.py @@ -79,7 +79,9 @@ def autoUpdate(self): try: if self.conf('notification'): info = self.updater.info() - version_date = datetime.fromtimestamp(info['update_version']['date']) + version_date = 'the future!' + if info['update_version']['date']: + version_date = datetime.fromtimestamp(info['update_version']['date']) fireEvent('updater.updated', 'Updated to a new version with hash "%s", this version is from %s' % (info['update_version']['hash'], version_date), data = info) except: log.error('Failed notifying for update: %s', traceback.format_exc()) @@ -97,7 +99,9 @@ def check(self, force = False): if self.updater.check(): if not self.available_notified and self.conf('notification') and not self.conf('automatic'): info = self.updater.info() - version_date = datetime.fromtimestamp(info['update_version']['date']) + version_date = 'the future!' + if info['update_version']['date']: + version_date = datetime.fromtimestamp(info['update_version']['date']) fireEvent('updater.available', message = 'A new update with hash "%s" is available, this version is from %s' % (info['update_version']['hash'], version_date), data = info) self.available_notified = True return True