Fixed bug preventing superfast mode from being set properly.

This commit is contained in:
robertem 2017-02-20 12:49:47 +00:00
parent d78f7b2ede
commit 015c64a2ac
1 changed files with 2 additions and 2 deletions

View File

@ -93,9 +93,9 @@ When finished, write an empty line to confirm the purchase.\n'''
self.add_thing_to_purchase(thing, num) self.add_thing_to_purchase(thing, num)
def is_product(candidate): def is_product(candidate):
return isinstance(candidate, Product) return isinstance(candidate[0], Product)
if len(initial_contents) > 0 and all(map(is_product, initial_contents[0])): if len(initial_contents) > 0 and all(map(is_product, initial_contents)):
self.superfast_mode = True self.superfast_mode = True
print '***********************************************' print '***********************************************'
print '****** Buy menu is in SUPERFASTmode[tm]! ******' print '****** Buy menu is in SUPERFASTmode[tm]! ******'