From 694cbbe81ffe1552232bb81c462622c3093de397 Mon Sep 17 00:00:00 2001 From: xxyy Date: Sat, 15 Feb 2014 00:16:03 +0100 Subject: [PATCH] Fix xkcd comics made in January throwing an error Previously, any commit written in January would throw an error because the array key for January was falsely '1' instead of the integer 1. This would lead to the moth name not being found and the error occuring. This PR fixes that problem by changing the key of January to the integer 1. **How to reproduce:** Ask your CloudBot to `xkcd Regular Expressions`, an error will be shown in console. --- plugins/xkcd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/xkcd.py b/plugins/xkcd.py index fd632fb..d7fad59 100644 --- a/plugins/xkcd.py +++ b/plugins/xkcd.py @@ -4,7 +4,7 @@ from util import hook, http xkcd_re = (r'(.*:)//(www.xkcd.com|xkcd.com)(.*)', re.I) -months = {'1': 'January', 2: 'February', 3: 'March', 4: 'April', 5: 'May', 6: 'June', 7: 'July', 8: 'August', +months = {1: 'January', 2: 'February', 3: 'March', 4: 'April', 5: 'May', 6: 'June', 7: 'July', 8: 'August', 9: 'September', 10: 'October', 11: 'November', 12: 'December'}