From 71c984c024d1001124560410a68ac509d74086c4 Mon Sep 17 00:00:00 2001 From: Alexey Petul Date: Wed, 4 Sep 2024 14:21:50 +0400 Subject: [PATCH] Fix invalid escape sequence in get_api_version func --- splunklib/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/splunklib/client.py b/splunklib/client.py index 48861880..d0aa74bd 100644 --- a/splunklib/client.py +++ b/splunklib/client.py @@ -769,7 +769,7 @@ def get_api_version(self, path): # For example, "/services/search/jobs" is using API v1 api_version = 1 - versionSearch = re.search('(?:servicesNS\/[^/]+\/[^/]+|services)\/[^/]+\/v(\d+)\/', path) + versionSearch = re.search(r'(?:servicesNS\/[^/]+\/[^/]+|services)\/[^/]+\/v(\d+)\/', path) if versionSearch: api_version = int(versionSearch.group(1))