Skip to content

Commit

Permalink
replace removeprefix with string slicing. (#953) (#955)
Browse files Browse the repository at this point in the history
Signed-off-by: Tomoya Fujita <[email protected]>
(cherry picked from commit 35d6abd)

Co-authored-by: Tomoya Fujita <[email protected]>
  • Loading branch information
mergify[bot] and fujitatomoya authored Dec 17, 2024
1 parent eab6c97 commit aedabf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ros2cli/ros2cli/node/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit aedabf9

Please sign in to comment.