summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaZderMind <git@mazdermind.de>2015-11-14 15:27:28 +0100
committerMaZderMind <git@mazdermind.de>2015-11-14 17:13:09 +0100
commitaf0ef0110ff88b96d8b12672bfd35dfc0bd5b0aa (patch)
tree6659c9a34db784644fd1612b5fa9eeeb912c9fef
parent86ba5cf8a81920b4f79840adcd226591fc0d0323 (diff)
alow more -v's on the command-line
-rw-r--r--voctocore/lib/args.py2
-rwxr-xr-xvoctocore/voctocore.py2
-rw-r--r--voctogui/lib/args.py2
-rwxr-xr-xvoctogui/voctogui.py2
4 files changed, 4 insertions, 4 deletions
diff --git a/voctocore/lib/args.py b/voctocore/lib/args.py
index b7575ff..953f9ab 100644
--- a/voctocore/lib/args.py
+++ b/voctocore/lib/args.py
@@ -4,7 +4,7 @@ import argparse
__all__ = ['Args']
parser = argparse.ArgumentParser(description='Voctocore')
-parser.add_argument('-v', '--verbose', action='count',
+parser.add_argument('-v', '--verbose', action='count', default=0,
help="Also print INFO and DEBUG messages.")
parser.add_argument('-c', '--color', action='store', choices=['auto', 'always', 'never'], default='auto',
diff --git a/voctocore/voctocore.py b/voctocore/voctocore.py
index aa5350d..ad3f1cf 100755
--- a/voctocore/voctocore.py
+++ b/voctocore/voctocore.py
@@ -56,7 +56,7 @@ def main():
# configure logging
docolor = (Args.color == 'always') or (Args.color == 'auto' and sys.stderr.isatty())
- if Args.verbose == 2:
+ if Args.verbose >= 2:
level = logging.DEBUG
elif Args.verbose == 1:
level = logging.INFO
diff --git a/voctogui/lib/args.py b/voctogui/lib/args.py
index 3a9032f..6a34a6b 100644
--- a/voctogui/lib/args.py
+++ b/voctogui/lib/args.py
@@ -4,7 +4,7 @@ import argparse
__all__ = ['Args']
parser = argparse.ArgumentParser(description='Voctogui')
-parser.add_argument('-v', '--verbose', action='count',
+parser.add_argument('-v', '--verbose', action='count', default=0,
help="Also print INFO and DEBUG messages.")
parser.add_argument('-c', '--color', action='store', choices=['auto', 'always', 'never'], default='auto',
diff --git a/voctogui/voctogui.py b/voctogui/voctogui.py
index d37e168..fa81d1c 100755
--- a/voctogui/voctogui.py
+++ b/voctogui/voctogui.py
@@ -82,7 +82,7 @@ def main():
# configure logging
docolor = (Args.color == 'always') or (Args.color == 'auto' and sys.stderr.isatty())
- if Args.verbose == 2:
+ if Args.verbose >= 2:
level = logging.DEBUG
elif Args.verbose == 1:
level = logging.INFO