diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2017-03-12 17:09:07 +0100 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2017-03-12 17:09:07 +0100 |
commit | 0c2f43d9b6c73df3be26d9b47a772438f97a5a02 (patch) | |
tree | f1e091602942ff8ea07cdf45093843b5299e358b /archivist/cli.py | |
parent | 8c8d9f51685b3b172a8d23d3c0c01d53351c6d80 (diff) | |
download | archivist-0c2f43d9b6c73df3be26d9b47a772438f97a5a02.tar.gz archivist-0c2f43d9b6c73df3be26d9b47a772438f97a5a02.tar.bz2 archivist-0c2f43d9b6c73df3be26d9b47a772438f97a5a02.zip |
Allow DEBUG envvar to be the same as -d
Diffstat (limited to '')
-rw-r--r-- | archivist/cli.py | 4 |
1 files changed, 3 insertions, 1 deletions
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(): |