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

(cherry picked from commit 989b26a843)
This commit is contained in:
Thomas Haller 2019-09-24 19:56:26 +02:00
parent a2af6cc298
commit 992c5abb53

View file

@ -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: