Skip to content
Snippets Groups Projects
Commit 021782fe authored by Florent Lamiraux's avatar Florent Lamiraux
Browse files

Compatibility with python3.

parent 50298c7a
No related branches found
No related tags found
No related merge requests found
......@@ -67,12 +67,12 @@ class RosShell(InteractiveConsole):
return self.runcode(code, False)
response = self.client(str(source))
if response.standardoutput != "":
print response.standardoutput[:-1]
print(response.standardoutput[:-1])
if response.standarderror != "":
print response.standarderror[:-1]
print(response.standarderror[:-1])
elif response.result != "None":
print response.result
except rospy.ServiceException, e:
print(response.result)
except rospy.ServiceException as e:
print("Connection to remote server lost. Reconnecting...")
self.client = rospy.ServiceProxy(
'run_command', dynamic_graph_bridge_msgs.srv.RunCommand, True)
......@@ -88,7 +88,11 @@ class RosShell(InteractiveConsole):
return self.runcode(c)
else:
return True
except SyntaxError, OverflowError:
except SyntaxError:
self.showsyntaxerror()
self.cache = ""
return False
except OverflowError:
self.showsyntaxerror()
self.cache = ""
return False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment