Skip to content

Commit

Permalink
expired was untested, still had bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
gmn committed Jul 3, 2016
1 parent 2783274 commit 7cf3175
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions todo
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,10 @@ class CItem:
comments = ''

active = 1
attribs = ('_id', 'title', 'added', 'finished', 'comments', 'active')
expired = 0
attribs = ('_id', 'title', 'added', 'finished', 'comments', 'active', 'expired')

def __init__(self, _t=None, _id=None, title=None, added=None, finished=None, comments=None, active=None):
def __init__(self, _t=None, _id=None, title=None, added=None, finished=None, comments=None, active=None, expired=None):
if _t:
self._t = _t
if _id is not None:
Expand All @@ -119,6 +120,8 @@ class CItem:
self.comments = comments
if active is not None:
self.active = active
if expired is not None:
self.expired = expired

#
# dictionary-like interfaces
Expand Down Expand Up @@ -987,7 +990,7 @@ elif op == 'finish': # mark item finished
finish_item(title, args)
elif op == 'expire': # mark item expired
copy_args = args.copy()
copy_args.append('e')
copy_args.append('-e')
finish_item(title, copy_args)
elif op == 'finished':
show_finished(title, args)
Expand Down

0 comments on commit 7cf3175

Please sign in to comment.