Remove unneeded else from for/else loop. It confuses pylint

(cherry picked from commit 2950f2641b)
This commit is contained in:
Brian C. Lane 2019-01-08 11:38:26 -08:00
parent e2a0c38e75
commit 9431a85b85

View File

@ -375,7 +375,6 @@ class CustomizationsTests(unittest.TestCase):
for user in ks.handler.user.userList:
if user.name == username:
return user
else:
return None
@staticmethod
@ -383,7 +382,6 @@ class CustomizationsTests(unittest.TestCase):
for key in ks.handler.sshkey.sshUserList:
if key.username == username:
return key
else:
return None
@staticmethod
@ -391,7 +389,6 @@ class CustomizationsTests(unittest.TestCase):
for group in ks.handler.group.groupList:
if group.name == groupname:
return group
else:
return None
def test_hostname(self):