Remove unneeded else from for/else loop. It confuses pylint
(cherry picked from commit 2950f2641b
)
Related: rhbz#1666517
This commit is contained in:
parent
252c9f6226
commit
3e5e8b9f1d
@ -375,7 +375,6 @@ class CustomizationsTests(unittest.TestCase):
|
|||||||
for user in ks.handler.user.userList:
|
for user in ks.handler.user.userList:
|
||||||
if user.name == username:
|
if user.name == username:
|
||||||
return user
|
return user
|
||||||
else:
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@ -383,7 +382,6 @@ class CustomizationsTests(unittest.TestCase):
|
|||||||
for key in ks.handler.sshkey.sshUserList:
|
for key in ks.handler.sshkey.sshUserList:
|
||||||
if key.username == username:
|
if key.username == username:
|
||||||
return key
|
return key
|
||||||
else:
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@ -391,7 +389,6 @@ class CustomizationsTests(unittest.TestCase):
|
|||||||
for group in ks.handler.group.groupList:
|
for group in ks.handler.group.groupList:
|
||||||
if group.name == groupname:
|
if group.name == groupname:
|
||||||
return group
|
return group
|
||||||
else:
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def test_hostname(self):
|
def test_hostname(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user