commit 1dd2969fcd51f2b654d7c1fead37703317bb8241 parent 5f3b51a0f52f10f88e78206efa31f3a52856f715 Author: Antoine Amarilli <a3nm@a3nm.net> Date: Tue, 15 Nov 2016 12:07:18 +0100 do not fail on empty strings Diffstat:
wikifirc | | | 2 | ++ |
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/wikifirc b/wikifirc @@ -34,6 +34,8 @@ colors = { } def capitalize(s): + if len(s) == 0: + return '' return (s[0].upper() + s[1:]) def colorize(text, color):