Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
  • Loading branch information
arjo129 committed Feb 6, 2023
1 parent c6dda6e commit 58a16d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ros2topic/ros2topic/verb/pub.py
Expand Up @@ -114,9 +114,6 @@ def main(args):
if args.once:
times = 1

if args.wait_matching_subscriptions is None and args.max_wait_time_secs is not None:
return '--max-wait-time-secs option is only effective with --wait-matching-subscriptions'

with DirectNode(args, node_name=args.node_name) as node:
return publisher(
node.node,
Expand Down Expand Up @@ -157,6 +154,9 @@ def publisher(

pub = node.create_publisher(msg_module, topic_name, qos_profile)

if wait_matching_subscriptions is None and max_wait_time is not None:
return '--max-wait-time-secs option is only effective with --wait-matching-subscriptions, --once or --times'

times_since_last_log = 0
total_wait_time = 0
while pub.get_subscription_count() < wait_matching_subscriptions:
Expand Down

0 comments on commit 58a16d1

Please sign in to comment.