mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 14:40:08 +01:00
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:
parent
a2af6cc298
commit
992c5abb53
1 changed files with 2 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue