From fa1ef33ac0474a6ada2e841d4cfce91bbe35a0ec Mon Sep 17 00:00:00 2001 From: Ivan Santiago Paunovic Date: Fri, 11 Oct 2019 16:32:53 -0300 Subject: [PATCH] Corrected bugs Signed-off-by: Ivan Santiago Paunovic --- ros2cli/ros2cli/daemon/__init__.py | 2 +- ros2cli/ros2cli/node/daemon.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ros2cli/ros2cli/daemon/__init__.py b/ros2cli/ros2cli/daemon/__init__.py index a0f985563..261ed3500 100644 --- a/ros2cli/ros2cli/daemon/__init__.py +++ b/ros2cli/ros2cli/daemon/__init__.py @@ -115,7 +115,7 @@ def __getattr__(self, name): def wrapper(): self.reset_if_addresses_changed() - return self.node.__getattr__(name) + return self.node.__getattr__(name)() wrapper.__name__ = attr.__name__ if inspect.ismethod(attr): diff --git a/ros2cli/ros2cli/node/daemon.py b/ros2cli/ros2cli/node/daemon.py index beda3d2aa..9a96d3bf7 100644 --- a/ros2cli/ros2cli/node/daemon.py +++ b/ros2cli/ros2cli/node/daemon.py @@ -76,7 +76,7 @@ def spawn_daemon(args, wait_until_spawned=None): # the arguments are only passed for visibility in e.g. the process list '--rmw-implementation', rmw_implementation_identifier, '--ros-domain-id', str(ros_domain_id)]) - if not args.debug: + if not hasattr(args, 'debug') or not args.debug: kwargs['stdout'] = subprocess.DEVNULL kwargs['stderr'] = subprocess.DEVNULL subprocess.Popen(cmd, **kwargs)