Merge pull request #36 from cosarara/master

don't use "is" to compare string literals
pull/38/head
Jake Funke 2021-01-25 14:18:39 -08:00 committed by GitHub
commit d0a9bf22a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ class CursedMenu(object):
def set_options(self, options): def set_options(self, options):
# Validates that the last option is "exit" # Validates that the last option is "exit"
if options[-1] is not 'exit': if options[-1] != 'exit':
options.append('exit') options.append('exit')
self.options = options self.options = options
@ -114,7 +114,7 @@ class CursedMenu(object):
# Actually draws the menu and handles branching # Actually draws the menu and handles branching
request = "" request = ""
try: try:
while request is not "exit": while request != "exit":
self.draw() self.draw()
request = self.get_user_input() request = self.get_user_input()
self.handle_request(request) self.handle_request(request)