From 9badb9acd7bbf035f4756ff70c6a4c5330b7d1df Mon Sep 17 00:00:00 2001 From: Karthikeyan Singaravelan Date: Sat, 11 Apr 2020 14:49:05 +0000 Subject: [PATCH 1/2] Fix SyntaxWarning over comparison of literals using is --- splunklib/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/splunklib/client.py b/splunklib/client.py index de2f53a16..39b1dcc34 100644 --- a/splunklib/client.py +++ b/splunklib/client.py @@ -1872,7 +1872,7 @@ def delete(self, username, realm=None): name = UrlEncoded(realm, encode_slash=True) + ":" + UrlEncoded(username, encode_slash=True) # Append the : expected at the end of the name - if name[-1] is not ":": + if name[-1] != ":": name = name + ":" return Collection.delete(self, name) From 98ab7bbd94eae05b1d393a61c6fdc1f042a15e88 Mon Sep 17 00:00:00 2001 From: Karthikeyan Singaravelan Date: Sat, 11 Apr 2020 14:49:11 +0000 Subject: [PATCH 2/2] Fix deprecation warning regarding invalid escape sequences. --- splunklib/searchcommands/internals.py | 2 +- tests/testlib.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/splunklib/searchcommands/internals.py b/splunklib/searchcommands/internals.py index 41caceb32..f7146e289 100644 --- a/splunklib/searchcommands/internals.py +++ b/splunklib/searchcommands/internals.py @@ -75,7 +75,7 @@ def set_binary_mode(fh): class CommandLineParser(object): - """ Parses the arguments to a search command. + r""" Parses the arguments to a search command. A search command line is described by the following syntax. diff --git a/tests/testlib.py b/tests/testlib.py index c5a40648d..04006030f 100644 --- a/tests/testlib.py +++ b/tests/testlib.py @@ -184,7 +184,7 @@ def app_collection_installed(self): return collectionName in self.service.apps def pathInApp(self, appName, pathComponents): - """Return a path to *pathComponents* in *appName*. + r"""Return a path to *pathComponents* in *appName*. `pathInApp` is used to refer to files in applications installed with `install_app_from_collection`. For example, the app `file_to_upload` in