Do not prompt to add backends if not in an interactive session

This commit is contained in:
Laurent Bachelier 2011-05-06 00:45:05 +02:00
commit 3154d7f79d

View file

@ -92,7 +92,7 @@ class ConsoleApplication(BaseApplication):
def check_loaded_backends(self, default_config=None):
while len(self.enabled_backends) == 0:
print 'Warning: there is currently no configured backend for %s' % self.APPNAME
if not self.ask('Do you want to configure backends?', default=True):
if not self.interactive or not self.ask('Do you want to configure backends?', default=True):
return False
self.prompt_create_backends(default_config)