Fix var.CASEMAPPING error during db upgrade

This commit is contained in:
jacob1 2016-08-06 12:38:59 -04:00
parent fe9877f471
commit 75b386917e

View File

@ -182,6 +182,9 @@ def irc_lower(nick):
"^": "~", "^": "~",
} }
# var.CASEMAPPING may not be defined yet in some circumstances (like database upgrades)
# if so, default to rfc1459
if hasattr(var, "CASEMAPPING"):
if var.CASEMAPPING == "strict-rfc1459": if var.CASEMAPPING == "strict-rfc1459":
mapping.pop("^") mapping.pop("^")
elif var.CASEMAPPING == "ascii": elif var.CASEMAPPING == "ascii":