Commit 5bddaab1 authored by Ad Schellevis's avatar Ad Schellevis

fix execute command test utility for configd

parent 7ac44e8c
......@@ -59,6 +59,7 @@ else:
if line:
data = data + line
# end of stream marker found, exit
if data.find("%c%c%c"%(chr(0),chr(0),chr(0))) > -1:
break
......
......@@ -63,13 +63,19 @@ except socket.error, msg:
try:
print ('send:%s '%exec_command)
sock.send(exec_command)
data = []
data = ""
while True:
line = sock.recv(4096)
if line:
data.append(line)
else:
data = data + line
# end of stream marker found, exit
if data.find("%c%c%c"%(chr(0),chr(0),chr(0))) > -1:
break
print ('response:%s'% ''.join(data) )
print ('response:%s'% data[:-3] )
finally:
sock.close()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment