correct dict unpacking of escape characters

closes #554
This commit is contained in:
Adarnof 2016-10-18 13:16:17 -04:00 committed by GitHub
parent 3704586ec9
commit e242b8cfec

View File

@ -162,7 +162,7 @@ class TS3Proto:
if isinstance(value, int): if isinstance(value, int):
return "%d" % value return "%d" % value
value = value.replace("\\", r'\\') value = value.replace("\\", r'\\')
for i, j in ts3_escape: for i, j in ts3_escape.items():
value = value.replace(i, j) value = value.replace(i, j)
return value return value
@ -177,7 +177,7 @@ class TS3Proto:
if isinstance(value, int): if isinstance(value, int):
return "%d" % value return "%d" % value
value = value.replace(r"\\", "\\") value = value.replace(r"\\", "\\")
for i, j in ts3_escape: for i, j in ts3_escape.items():
value = value.replace(j, i) value = value.replace(j, i)
return value return value