From 3e5e8b9f1d76d6b7b0fed30f0f2498b15502a816 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Tue, 8 Jan 2019 11:38:26 -0800 Subject: [PATCH] Remove unneeded else from for/else loop. It confuses pylint (cherry picked from commit 2950f2641bdf8faa8e18c857698597a06a6057a3) Related: rhbz#1666517 --- tests/pylorax/test_recipes.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/pylorax/test_recipes.py b/tests/pylorax/test_recipes.py index 6d4d527b..06fb0209 100644 --- a/tests/pylorax/test_recipes.py +++ b/tests/pylorax/test_recipes.py @@ -375,24 +375,21 @@ class CustomizationsTests(unittest.TestCase): for user in ks.handler.user.userList: if user.name == username: return user - else: - return None + return None @staticmethod def _find_sshkey(ks, username): for key in ks.handler.sshkey.sshUserList: if key.username == username: return key - else: - return None + return None @staticmethod def _find_group(ks, groupname): for group in ks.handler.group.groupList: if group.name == groupname: return group - else: - return None + return None def test_hostname(self): blueprint_data = """name = "test-hostname"