From d95532e554507614a906956834a41681aa45ddd0 Mon Sep 17 00:00:00 2001 From: AhmedMoaz <55327408+AhmedMoaz@users.noreply.github.com> Date: Mon, 24 Jun 2024 04:18:44 -0700 Subject: [PATCH] Update daemon.py for Python 3.8 compatibility (#912) Signed-off-by: AhmedMoaz <55327408+AhmedMoaz@users.noreply.github.com> --- ros2cli/ros2cli/node/daemon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ros2cli/ros2cli/node/daemon.py b/ros2cli/ros2cli/node/daemon.py index c25a2d847..1733bce40 100644 --- a/ros2cli/ros2cli/node/daemon.py +++ b/ros2cli/ros2cli/node/daemon.py @@ -145,7 +145,7 @@ def spawn_daemon(args, timeout=None, debug=False): with open('/proc/self/status', 'r') as f: for line in f: if line.startswith(string_to_find): - fdlimit = int(line.removeprefix(string_to_find).strip()) + fdlimit = int(line[len(string_to_find):].strip()) break except (FileNotFoundError, ValueError): pass