summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2017-03-12 17:09:07 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2017-03-12 17:09:07 +0100
commit0c2f43d9b6c73df3be26d9b47a772438f97a5a02 (patch)
treef1e091602942ff8ea07cdf45093843b5299e358b
parent8c8d9f51685b3b172a8d23d3c0c01d53351c6d80 (diff)
downloadarchivist-0c2f43d9b6c73df3be26d9b47a772438f97a5a02.tar.gz
archivist-0c2f43d9b6c73df3be26d9b47a772438f97a5a02.tar.bz2
archivist-0c2f43d9b6c73df3be26d9b47a772438f97a5a02.zip
Allow DEBUG envvar to be the same as -d
-rw-r--r--archivist/cli.py4
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():