Skip to content

Commit c7458a7

Browse files
committed
Use raw string for a regex pattern
In recent Python versions, '\d' emits a SyntaxWarning. Use raw string to treat the backslash in '\d' as a literal backslash.
1 parent d7a0701 commit c7458a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SwanSpawner/swanspawner/swanspawner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ async def poll(self):
284284
if exit_return_code.isdigit():
285285
value_cleaned = exit_return_code
286286
else:
287-
result = re.search('ExitCode=(\d+)', exit_return_code)
287+
result = re.search(r'ExitCode=(\d+)', exit_return_code)
288288
if not result:
289289
raise Exception("unknown exit code format for this Spawner")
290290
value_cleaned = result.group(1)

0 commit comments

Comments
 (0)