Browse Source

Don't error out on empty date

tags/build/2.6.3 build/2.6.3
Ruud 10 years ago
parent
commit
965b8089f1
  1. 4
      couchpotato/core/_base/updater/main.py

4
couchpotato/core/_base/updater/main.py

@ -79,6 +79,8 @@ class Updater(Plugin):
try:
if self.conf('notification'):
info = self.updater.info()
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:
@ -97,6 +99,8 @@ class Updater(Plugin):
if self.updater.check():
if not self.available_notified and self.conf('notification') and not self.conf('automatic'):
info = self.updater.info()
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

Loading…
Cancel
Save