summaryrefslogtreecommitdiff
path: root/py/demo/Ice/converter/Client.py
diff options
context:
space:
mode:
Diffstat (limited to 'py/demo/Ice/converter/Client.py')
-rwxr-xr-xpy/demo/Ice/converter/Client.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/py/demo/Ice/converter/Client.py b/py/demo/Ice/converter/Client.py
index 0cfa49cb3db..c05f8f31ec8 100755
--- a/py/demo/Ice/converter/Client.py
+++ b/py/demo/Ice/converter/Client.py
@@ -24,8 +24,14 @@ x: exit
"""
def decodeString(str):
- # TODO: implement properly!
- return str
+ ret = ""
+ for i in range(0, len(str)):
+ n = ord(str[i])
+ if n < 32 or n > 126:
+ ret += "\\" + oct(n)[1:] # Skip leading '0'
+ else:
+ ret += str[i]
+ return ret
communicator1 = None
communicator2 = None
@@ -78,8 +84,6 @@ class Client:
return 0
-
-
status = 0
try:
@@ -105,7 +109,6 @@ except:
traceback.print_exc()
status = 1
-
if communicator1:
try:
communicator1.destroy()