From: CMDR furrycat Date: Wed, 12 Oct 2016 18:06:39 +0000 (+0100) Subject: Fixed TypeError showing announcement. X-Git-Url: http://git.furryclan.net/?a=commitdiff_plain;h=a236fd145aa0c4b1d07415024385395cdec0f733;p=furrycat%2Fcatbot.git Fixed TypeError showing announcement. --- diff --git a/bot.py b/bot.py index c8d1960..30c03f5 100755 --- 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':