Skip to content

Commit

Permalink
addressed rospy import issue & noformat
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Jae-Yoon Chung committed Nov 1, 2014
1 parent 1fe850b commit 782dbe1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tools/rosgraph/src/rosgraph/roslogging.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,11 @@ def emit(self, record):
msg = msg.replace('${file}', str(record.pathname))
msg = msg.replace('${line}', str(record.lineno))
msg = msg.replace('${function}', str(record.funcName))
from rospy import get_name
msg = msg.replace('${node}', get_name())
try:

This comment has been minimized.

Copy link
@mjyc

mjyc Nov 1, 2014

Owner

Took an approach similar to the line 145-151 of this file. Also please check replied comment here.

from rospy import get_name
msg = msg.replace('${node}', get_name())
except ImportError:
msg = msg.replace('${node}', 'unavailable')
if self._get_time is not None and not self._is_wallclock():
msg += ' [%f]' % self._get_time()
msg += '\n'
Expand Down

0 comments on commit 782dbe1

Please sign in to comment.