From 327ea4e019f8c914cc8170baf3777b8e47a9059b Mon Sep 17 00:00:00 2001 From: Massimo DiPierro Date: Fri, 11 May 2012 17:41:25 -0500 Subject: [PATCH] Create default logging.conf if it doesn't exist, thanks Marc --- VERSION | 2 +- gluon/widget.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 39b7f23a..09cf3524 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-05-11 14:51:42) dev +Version 2.00.0 (2012-05-11 17:41:20) dev diff --git a/gluon/widget.py b/gluon/widget.py index 42e4ea2b..85ce0a2e 100644 --- a/gluon/widget.py +++ b/gluon/widget.py @@ -895,6 +895,12 @@ def start(cron=True): if hasattr(options,key): setattr(options,key,getattr(options2,key)) + if not os.path.exists('logging.conf'): + import shutil + sys.stdout.write("Copying logging.conf.example to logging.conf ... ") + shutil.copyfile('logging.example.conf', 'logging.conf') + sys.stdout.write("OK\n") + # ## if -T run doctests (no cron) if hasattr(options,'test') and options.test: test(options.test, verbose=options.verbose)