From a210affed82fe382f745033a5531b3a3b079cfdd Mon Sep 17 00:00:00 2001 From: Kartik Mohta Date: Thu, 14 Sep 2017 16:29:31 -0400 Subject: [PATCH] Minor fixes for compatibility with both Python 2 & 3 --- tools/rosnode/src/rosnode/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/rosnode/src/rosnode/__init__.py b/tools/rosnode/src/rosnode/__init__.py index 44917fb117..e5da0106b3 100644 --- a/tools/rosnode/src/rosnode/__init__.py +++ b/tools/rosnode/src/rosnode/__init__.py @@ -182,7 +182,6 @@ def get_nodes_by_machine(machine): @raise ROSNodeException: if machine name cannot be resolved to an address @raise ROSNodeIOException: if unable to communicate with master """ - import urlparse master = rosgraph.Master(ID) try: @@ -338,7 +337,7 @@ def rosnode_ping(node_name, max_count=None, verbose=False): # 3786: catch ValueError on unpack as socket.error is not always a tuple try: # #3659 - errnum, msg = e + errnum, msg = e.args if errnum == -2: #name/service unknown p = urlparse.urlparse(node_api) print("ERROR: Unknown host [%s] for node [%s]"%(p.hostname, node_name), file=sys.stderr)