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

Commit

Permalink
Don't error out on empty date
Browse files Browse the repository at this point in the history
  • Loading branch information
RuudBurger committed Feb 22, 2015
1 parent 0bd9534 commit 965b808
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions couchpotato/core/_base/updater/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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
Expand Down

0 comments on commit 965b808

Please sign in to comment.