rostopic: fixed for fill_message_args changes

This commit is contained in:
Ken Conley 2009-10-02 21:32:01 +00:00
parent a544573dc1
commit 80e00d36ce
2 changed files with 5 additions and 6 deletions

View File

@ -151,8 +151,11 @@ class TestRostopicOnline(unittest.TestCase):
while time.time() < timeout_t and self.vals != all:
time.sleep(0.1)
# - check published value
msg = self.msgs[key]
# - check published value
try:
msg = self.msgs[key]
except KeyError:
self.fail("no message received on "+str(key))
self.assertEquals(s, msg.data)
os.kill(popen.pid, signal.SIGKILL)

View File

@ -1038,10 +1038,6 @@ def rostopic_cmd_pub(argv):
if rospy.is_shutdown():
break
else:
# if user sent us a dictionary as the only argument, strip the
# list container as we are mapping it to the entire message
if len(pub_args) == 1 and type(pub_args[0]) == dict:
pub_args = pub_args[0]
rostopic_pub(pub, msg_class, pub_args, options.rate, options.once, verbose=options.verbose)
def _stdin_yaml_arg():