roslib: fix for #3241

This commit is contained in:
Ken Conley 2011-01-13 02:15:30 +00:00
parent 75d02c1290
commit cff95d3b89
1 changed files with 3 additions and 3 deletions

View File

@ -367,11 +367,11 @@ def _init():
return
fname = '%s%s'%(HEADER, EXT)
roslib_dir = roslib.packages.get_pkg_dir('roslib')
if roslib_dir is None:
std_msgs_dir = roslib.packages.get_pkg_dir('std_msgs')
if std_msgs_dir is None:
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):
print >> sys.stderr, "ERROR: cannot locate %s. Excepted to find it at '%s'"%(fname, header)
return False