Set do_config as True if file is not found

Instead of leaving the user with an error due to FileNotFoundError exception.
This commit is contained in:
Gustavo Jose de Sousa 2016-07-28 18:11:40 -03:00
parent 954594bf07
commit 8c4401637a
1 changed files with 7 additions and 2 deletions

View File

@ -592,8 +592,13 @@ def autoconfigure(execute_method):
else:
h = 0
for f in env.files:
h = Utils.h_list((h, Utils.readf(f, 'rb')))
do_config = h != env.hash
try:
h = Utils.h_list((h, Utils.readf(f, 'rb')))
except FileNotFoundError:
do_config = True
break
else:
do_config = h != env.hash
if do_config:
cmd = env.config_cmd or 'configure'