From 0c2f43d9b6c73df3be26d9b47a772438f97a5a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Sun, 12 Mar 2017 17:09:07 +0100 Subject: Allow DEBUG envvar to be the same as -d --- archivist/cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/archivist/cli.py b/archivist/cli.py index 1c13952..5f1d8ba 100644 --- a/archivist/cli.py +++ b/archivist/cli.py @@ -1,4 +1,6 @@ import click +import os + from functools import reduce import operator as op @@ -15,7 +17,7 @@ def enable_debug(): @click.group(context_settings = CONTEXT_SETTINGS) @click.option('--debug', '-d', is_flag=True, default=False) def cli(debug): - if debug: enable_debug() + if debug or 'DEBUG' in os.environ: enable_debug() @cli.group() def db(): -- cgit v1.2.3