From c41c225a299bd5eb994a1618ea86d97b08d9bcb7 Mon Sep 17 00:00:00 2001 From: Aaron Static Date: Wed, 30 Jun 2010 23:47:55 +1000 Subject: [PATCH] left a print in op timer api --- api/handlers.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/api/handlers.py b/api/handlers.py index e5b24ff..674054c 100755 --- a/api/handlers.py +++ b/api/handlers.py @@ -136,13 +136,14 @@ class OpTimerHandler(BaseHandler): for node in events_node_children: if node.nodeType == 1: - ownerID = node.getAttribute('ownerID') - print ownerID + ownerID = node.getAttribute('ownerID') if ownerID != '1': date = node.getAttribute('eventDate') dt = datetime.strptime(date,'%Y-%m-%d %H:%M:%S') now = datetime.utcnow() - startsIn = int(dt.strftime('%s')) - int(now.strftime('%s')) + startsIn = int(dt.strftime('%s')) - int(now.strftime('%s')) + if startsIn < 0: + startsIn = 0 event = { 'startsIn': startsIn, 'eventID': node.getAttribute('eventID'),