improve reconfigure message
authorMathieu Lacage <mathieu.lacage@inria.fr>
Sat, 14 May 2011 19:47:03 +0200
changeset 51 353475370e5c
parent 50 bddc70687863
child 52 c3248234e871
improve reconfigure message
bake/Bake.py
--- a/bake/Bake.py	Sat May 14 19:43:15 2011 +0200
+++ b/bake/Bake.py	Sat May 14 19:47:03 2011 +0200
@@ -177,9 +177,15 @@
         configuration = Configuration(config)
         if not configuration.read():
             sys.stderr.write('The configuration file has been changed or has moved.\n'
-                             'You should consider running \'reconfigure\'.\n')
+                             'Running \'reconfigure\'. You should consider running it\n'
+                             'yourself to tweak some parameters if needed.')
             self._reconfigure(config, [])
             configuration = Configuration(config)
+            if not configuration.read():
+                sys.stderr.write('Oops. \'reconfigure\' did not succeed. You should consider\n'
+                                 'deleting your bakefile and running \'configure\' again.')
+                sys.exit(1)
+
         return configuration
 
     def _option_parser(self, operation_name):