From 33ec252d47e33090c80ec525526ae6b02b654c13 Mon Sep 17 00:00:00 2001 From: Graham Pugh Date: Thu, 5 Jul 2018 15:21:44 +0200 Subject: [PATCH] Fix code for testing for answer --- installinstallmacos.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/installinstallmacos.py b/installinstallmacos.py index 405af6f..a141e94 100755 --- a/installinstallmacos.py +++ b/installinstallmacos.py @@ -390,7 +390,9 @@ def main(): answer = index+1 print '# %s chosen.' % answer - if not answer: + try: + answer + except NameError: answer = raw_input( '\nChoose a product to download (1-%s): ' % len(product_info)) try: