summaryrefslogtreecommitdiff
path: root/clients
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-09-24 19:56:26 +0200
committerThomas Haller <thaller@redhat.com>2019-09-25 15:47:39 +0200
commit989b26a843acb259bc7ba8738b5994c8ca9a1e25 (patch)
tree25fa68b59314d188ca1715fe7f1545f322961b93 /clients
parentceae05cc4b1eea38916c4fc23e8ce809de7d0ebd (diff)
downloadNetworkManager-989b26a843acb259bc7ba8738b5994c8ca9a1e25.tar.gz
tests: don't compare string literal with "is" in "clients/tests/test-client.py"
Recent Python versions warn about this: ./clients/tests/test-client.py:569: SyntaxWarning: "is" with a literal. Did you mean "=="? elif lang is de: ./clients/tests/test-client.py:572: SyntaxWarning: "is" with a literal. Did you mean "=="? elif lang is pl: And rightly so: https://bugs.python.org/issue34850
Diffstat (limited to 'clients')
-rwxr-xr-xclients/tests/test-client.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/clients/tests/test-client.py b/clients/tests/test-client.py
index 307a1182f3..41398cc7ac 100755
--- a/clients/tests/test-client.py
+++ b/clients/tests/test-client.py
@@ -566,10 +566,10 @@ class TestNmcli(NmTestBase):
if lang is None or lang == 'C':
lang = 'C'
language = ''
- elif lang is 'de':
+ elif lang == 'de':
lang = 'de_DE.utf8'
language = 'de'
- elif lang is 'pl':
+ elif lang == 'pl':
lang = 'pl_PL.UTF-8'
language = 'pl'
else: