diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-11-17 08:30:06 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-11-17 08:30:06 +0100 |
commit | b0e987fbafaa28226c54157fb11993079c5341e2 (patch) | |
tree | 1f0cd04a505dce4680155f8bb4c7bb757984c030 /src/bootstrap.py | |
parent | Bugfix: should import Article in order to resolve the 'date' column for the o... (diff) | |
download | newspipe-b0e987fbafaa28226c54157fb11993079c5341e2.tar.gz newspipe-b0e987fbafaa28226c54157fb11993079c5341e2.tar.bz2 newspipe-b0e987fbafaa28226c54157fb11993079c5341e2.zip |
cleaning the mess in the libs directories
Diffstat (limited to 'src/bootstrap.py')
-rw-r--r-- | src/bootstrap.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bootstrap.py b/src/bootstrap.py index f9de381a..5af29c69 100644 --- a/src/bootstrap.py +++ b/src/bootstrap.py @@ -18,6 +18,10 @@ def set_logging(log_path=None, log_level=logging.INFO, modules=(), if conf.ON_HEROKU: log_format = '%(levelname)s %(message)s' if log_path: + if not os.path.exists(os.path.dirname(log_path)): + os.makedirs(os.path.dirname(log_path)) + if not os.path.exists(log_path): + open(log_path, 'w').close() handler = logging.FileHandler(log_path) else: handler = logging.StreamHandler() |