Remove unneeded else from for/else loop. It confuses pylint
(cherry picked from commit 2950f2641b
)
This commit is contained in:
parent
e2a0c38e75
commit
9431a85b85
@ -375,24 +375,21 @@ 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
|
||||||
def _find_sshkey(ks, username):
|
def _find_sshkey(ks, username):
|
||||||
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
|
||||||
def _find_group(ks, groupname):
|
def _find_group(ks, groupname):
|
||||||
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):
|
||||||
blueprint_data = """name = "test-hostname"
|
blueprint_data = """name = "test-hostname"
|
||||||
|
Loading…
Reference in New Issue
Block a user