Skip to content

Commit 0a5b560

Browse files
authored
catch ConnectionRefusedError, so that it can fall back to DirectNode. (#1014)
Signed-off-by: Tomoya Fujita <[email protected]>
1 parent 7ced745 commit 0a5b560

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

ros2param/test/test_verb_dump.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ def setUp(self):
158158
services = node.get_service_names_and_types_by_node(TEST_NODE, TEST_NAMESPACE)
159159
except rclpy.node.NodeNameNonExistentError:
160160
continue
161+
except ConnectionRefusedError:
162+
continue
161163
except xmlrpc.client.Fault as e:
162164
if 'NodeNameNonExistentError' in e.faultString:
163165
continue

ros2param/test/test_verb_list.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ def setUp(self):
129129
services = node.get_service_names_and_types_by_node(TEST_NODE, TEST_NAMESPACE)
130130
except rclpy.node.NodeNameNonExistentError:
131131
continue
132+
except ConnectionRefusedError:
133+
continue
132134
except xmlrpc.client.Fault as e:
133135
if 'NodeNameNonExistentError' in e.faultString:
134136
continue

ros2param/test/test_verb_load.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ def setUp(self):
195195
services = node.get_service_names_and_types_by_node(TEST_NODE, TEST_NAMESPACE)
196196
except rclpy.node.NodeNameNonExistentError:
197197
continue
198+
except ConnectionRefusedError:
199+
continue
198200
except xmlrpc.client.Fault as e:
199201
if 'NodeNameNonExistentError' in e.faultString:
200202
continue

0 commit comments

Comments
 (0)