Skip to content
Snippets Groups Projects
Unverified Commit de87cda1 authored by Guilhem Saurel's avatar Guilhem Saurel Committed by GitHub
Browse files

Merge pull request #90 from florent-lamiraux/devel

Compatibility with python3.
parents 4a43f765 c674342e
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,7 @@ class RosShell(InteractiveConsole):
return self.runcode(c)
else:
return True
except SyntaxError, OverflowError:
except (SyntaxError, 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