Skip to content

Commit

Permalink
fix goodbye msg bug #33
Browse files Browse the repository at this point in the history
  • Loading branch information
blahosyl committed Apr 15, 2024
1 parent fcc36ae commit f7783a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def ask_more():
# get global variables
global _dishes
global _planning
goodbye_message = "\n" + Fore.MAGENTA + "Have fun! 🍸 🍽 🍱 🧁" + Fore.RESET
# check if there are dishes left (note: dishes[0] = '', so this should not be counted)
if len(_dishes.dish_data) > 1:
# ask user if they want to add a dish to the shopping list, make input uppercase
Expand All @@ -140,13 +141,13 @@ def ask_more():
print("\nGot it! That's all for now, then.\n")
print(Fore.GREEN + "Here is your shopping list:" + Fore.RESET)
_shopping_list.print_formatted(_shopping_list.list_data)
print(goodbye_message)
else:
# stop the loop
_planning = False
print("You have selected all the dishes. Here is your shopping list:")
_shopping_list.print_formatted(_shopping_list.list_data)
# goodbye message
print("\n" + Fore.MAGENTA + "Have fun! 🍸 🍽 🍱 🧁" + Fore.RESET)
print(goodbye_message)


welcome()
Expand Down
Binary file added testing/bug-goodbye-message.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f7783a3

Please sign in to comment.