util: move to_ascii() from __main__

This commit is contained in:
Roman Zeyde
2015-08-17 17:49:10 +03:00
parent b7a1dd61ea
commit 88e60b4338
3 changed files with 12 additions and 6 deletions

View File

@@ -64,3 +64,7 @@ def frame(*msgs):
res.write(msg)
msg = res.getvalue()
return pack('L', len(msg)) + msg
def to_ascii(s):
return s.decode('ascii')