Update utils.py

This commit is contained in:
wannaphongcom
2015-10-16 12:54:18 +07:00
parent 7259746b2b
commit 4d47431c9f

View File

@@ -15,7 +15,7 @@ def now():
return int(time()*1000) return int(time()*1000)
def get_json(text): def get_json(text):
return json.loads(re.sub(r"for.*(.*;.*;.*).*;", '', text.decode("unicode-escape").encode('utf-8'))) # have bug !!! AttributeError: 'str' object has no attribute 'decode' return json.loads(re.sub(r"for.*(;;).*;", '', text.decode("unicode-escape"), 1)) # have bug !!! AttributeError: 'str' object has no attribute 'decode'
def digit_to_char(digit): def digit_to_char(digit):
if digit < 10: if digit < 10: