Skip to content

Commit

Permalink
Minor fixes for compatibility with both Python 2 & 3
Browse files Browse the repository at this point in the history
  • Loading branch information
kartikmohta authored and dirk-thomas committed Oct 26, 2017
1 parent 8f26db9 commit a915a99
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tools/rosnode/src/rosnode/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit a915a99

Please sign in to comment.