roslib: fix for #3241
This commit is contained in:
parent
75d02c1290
commit
cff95d3b89
|
@ -367,11 +367,11 @@ def _init():
|
||||||
return
|
return
|
||||||
|
|
||||||
fname = '%s%s'%(HEADER, EXT)
|
fname = '%s%s'%(HEADER, EXT)
|
||||||
roslib_dir = roslib.packages.get_pkg_dir('roslib')
|
std_msgs_dir = roslib.packages.get_pkg_dir('std_msgs')
|
||||||
if roslib_dir is None:
|
if std_msgs_dir is None:
|
||||||
raise MsgSpecException("Unable to locate roslib: %s files cannot be loaded"%EXT)
|
raise MsgSpecException("Unable to locate roslib: %s files cannot be loaded"%EXT)
|
||||||
|
|
||||||
header = os.path.join(roslib_dir, roslib.packages.MSG_DIR, fname)
|
header = os.path.join(std_msgs_dir, roslib.packages.MSG_DIR, fname)
|
||||||
if not os.path.isfile(header):
|
if not os.path.isfile(header):
|
||||||
print >> sys.stderr, "ERROR: cannot locate %s. Excepted to find it at '%s'"%(fname, header)
|
print >> sys.stderr, "ERROR: cannot locate %s. Excepted to find it at '%s'"%(fname, header)
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in New Issue