Skip to content

Commit

Permalink
freevo raises an exception when retrives scheduled prog from db
Browse files Browse the repository at this point in the history
[programitem.py]
+ check for attributes before assign
  • Loading branch information
kovalvalerii committed Feb 4, 2013
1 parent 18f04ba commit 56dbe62
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/tv/programitem.py
Expand Up @@ -83,8 +83,16 @@ def __init__(self, parent, prog, context='menu'):
self.scheduled = False

self.favorite = False
self.allowDuplicates = prog.allowDuplicates
self.onlyNew = prog.onlyNew
if hasattr(prog, 'allowDuplicates'):
self.allowDuplicates = prog.allowDuplicates
else:
self.allowDuplicates = 1

if hasattr(prog, 'onlyNew'):
self.onlyNew = prog.onlyNew
else:
self.onlyNew = 0

self.overlap = prog.overlap

self.start = time.strftime(config.TV_DATETIME_FORMAT, time.localtime(prog.start))
Expand Down

0 comments on commit 56dbe62

Please sign in to comment.