Commit 6d68a72e by Maxime Vdb Committed by Gabriel Falcão

Mvdb/harvest command use argparse (#527)

* use parser.add_argument() instead of make_option()

* default values for options are already defined in the parser

* verbosity=4 is now not supported anymore (cannot remove arg with argparse)

* do not define requires_system_checks for versions lower than 1.9

* verbosity default is 3

* requires_model_validation is useful for 1.6 and below
parent fb0f24f7
...@@ -22,7 +22,6 @@ release = 'kryptonite' ...@@ -22,7 +22,6 @@ release = 'kryptonite'
import os import os
import sys import sys
import traceback import traceback
import warnings
try: try:
from imp import reload from imp import reload
except ImportError: except ImportError:
...@@ -125,17 +124,11 @@ class Runner(object): ...@@ -125,17 +124,11 @@ class Runner(object):
from lettuce.plugins import dots as output from lettuce.plugins import dots as output
elif verbosity is 2: elif verbosity is 2:
from lettuce.plugins import scenario_names as output from lettuce.plugins import scenario_names as output
else: elif verbosity is 3:
if verbosity is 4: if no_color:
from lettuce.plugins import shell_output as output
else:
from lettuce.plugins import colored_shell_output as output from lettuce.plugins import colored_shell_output as output
msg = ('Deprecated in lettuce 2.2.21. Use verbosity 3 without '
'--no-color flag instead of verbosity 4')
warnings.warn(msg, DeprecationWarning)
elif verbosity is 3:
if no_color:
from lettuce.plugins import shell_output as output
else:
from lettuce.plugins import colored_shell_output as output
self.random = random self.random = random
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment