From 28bbe9c646c868ada0c3539c6b42780f386bf3a5 Mon Sep 17 00:00:00 2001 From: palmtree5 <3577255+palmtree5@users.noreply.github.com> Date: Sun, 13 May 2018 15:10:38 -0800 Subject: [PATCH] [V3 i18n] add a NoneType check on trying to normalize a string (#1632) Fixes #1631 --- redbot/core/i18n.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/redbot/core/i18n.py b/redbot/core/i18n.py index c4e700e8e..844869973 100644 --- a/redbot/core/i18n.py +++ b/redbot/core/i18n.py @@ -124,6 +124,9 @@ def _normalize(string, remove_newline=False): s += ' ' return s + if string is None: + return "" + string = string.replace('\\n\\n', '\n\n') string = string.replace('\\n', ' ') string = string.replace('\\"', '"')