Skip to content

Commit

Permalink
Merge pull request sopel-irc#535 from Beini/remind-fix
Browse files Browse the repository at this point in the history
[remind] Filter empty strings from the message
  • Loading branch information
tyrope committed Aug 16, 2014
2 parents afc8279 + 936600d commit 6c5f4e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion remind.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ def monitor(bot):
def remind(bot, trigger):
"""Gives you a reminder in the given amount of time."""
duration = 0
message = re.split('(\d+(?:\.\d+)? ?(?:' + periods + ')) ?', trigger.group(2))[1:]
message = filter(None, re.split('(\d+(?:\.\d+)? ?(?:' + periods + ')) ?',
trigger.group(2))[1:])
reminder = ''
stop = False
for piece in message:
Expand Down

0 comments on commit 6c5f4e7

Please sign in to comment.