Replace 'is' with '==' so the interpreter stops annoying me

This commit is contained in:
Lucas Noki 2020-01-19 21:03:38 +01:00
parent 526cfda6a8
commit aa48b95652

View File

@ -11,7 +11,7 @@ class SwapModule(AbstractModule):
def run(self):
actions = ["Create/Resize", "Delete", "Get location", "Get swap size"]
actions = ["Create/Resize", "Delete", "Get swap location", "Get swap size"]
menu = [
{
'type': 'list',
@ -21,13 +21,13 @@ class SwapModule(AbstractModule):
}
]
selected_action = prompt(menu)['action']
if selected_action is "Create/Resize":
if selected_action == "Create/Resize":
self.create_resize_swap()
elif selected_action is "Delete":
elif selected_action == "Delete":
self.delete_swap()
elif selected_action is "Get location":
elif selected_action == "Get swap location":
self.swap_location_check()
elif selected_action is "Get swap size":
elif selected_action == "Get swap size":
self.get_swap_size()
def swap_location_check(self) -> None: