Fixed TypeError showing announcement.
authorCMDR furrycat <elite@furrycat.net>
Wed, 12 Oct 2016 18:06:39 +0000 (19:06 +0100)
committerCMDR furrycat <elite@furrycat.net>
Wed, 12 Oct 2016 18:10:23 +0000 (19:10 +0100)
bot.py

diff --git a/bot.py b/bot.py
index c8d1960..30c03f5 100755 (executable)
--- a/bot.py
+++ b/bot.py
@@ -957,7 +957,7 @@ def show_announcement(message, id):
     if announcement['end_date'] < now:
       offset = None
       text += ' has expired'
-  if offset <= now:
+  if offset is not None and offset <= now:
     if announcement['interval']:
       text += ' scheduled for {}'.format(iso8601(offset + announcement['interval']))
   if announcement['asap'] == 'true':