Skip to content

Commit

Permalink
one more hardcoded python error code (#1181)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelarguedas authored and dirk-thomas committed Oct 6, 2017
1 parent 1f67866 commit 3879966
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/roslaunch/src/roslaunch/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
execution as a different user).
"""

import errno
import logging
import os
import socket
Expand Down Expand Up @@ -384,7 +385,7 @@ def start(self):
# is highly unlikely and unconfirmed
time.sleep(0.1)
except socket.error as e:
if e.errno == 113:
if e.errno == errno.EHOSTUNREACH:
p = urlparse(self.uri)
raise RLException("Unable to contact the address [%s], which should be local.\nThis is generally caused by:\n * bad local network configuration\n * bad ROS_IP environment variable\n * bad ROS_HOSTNAME environment variable\nCan you ping %s?"%(self.uri, p.hostname))
else:
Expand Down

0 comments on commit 3879966

Please sign in to comment.