Skip to content
This repository was archived by the owner on Sep 25, 2021. It is now read-only.

Commit 965b808

Browse files
committed
Don't error out on empty date
1 parent 0bd9534 commit 965b808

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

  • couchpotato/core/_base/updater

couchpotato/core/_base/updater/main.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ def autoUpdate(self):
7979
try:
8080
if self.conf('notification'):
8181
info = self.updater.info()
82-
version_date = datetime.fromtimestamp(info['update_version']['date'])
82+
version_date = 'the future!'
83+
if info['update_version']['date']:
84+
version_date = datetime.fromtimestamp(info['update_version']['date'])
8385
fireEvent('updater.updated', 'Updated to a new version with hash "%s", this version is from %s' % (info['update_version']['hash'], version_date), data = info)
8486
except:
8587
log.error('Failed notifying for update: %s', traceback.format_exc())
@@ -97,7 +99,9 @@ def check(self, force = False):
9799
if self.updater.check():
98100
if not self.available_notified and self.conf('notification') and not self.conf('automatic'):
99101
info = self.updater.info()
100-
version_date = datetime.fromtimestamp(info['update_version']['date'])
102+
version_date = 'the future!'
103+
if info['update_version']['date']:
104+
version_date = datetime.fromtimestamp(info['update_version']['date'])
101105
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)
102106
self.available_notified = True
103107
return True

0 commit comments

Comments
 (0)