From 442587bf0ae419e26f0ad761555be6da74b9be98 Mon Sep 17 00:00:00 2001 From: Michael Hanselmann Date: Thu, 7 Apr 2011 17:35:44 +0200 Subject: [PATCH] cli: Add option to force names to be treated as filter Signed-off-by: Michael Hanselmann Reviewed-by: Iustin Pop --- lib/cli.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/cli.py b/lib/cli.py index 50bb158..d6a74e5 100644 --- a/lib/cli.py +++ b/lib/cli.py @@ -77,6 +77,7 @@ __all__ = [ "FIELDS_OPT", "FILESTORE_DIR_OPT", "FILESTORE_DRIVER_OPT", + "FORCE_FILTER_OPT", "FORCE_OPT", "FORCE_VARIANT_OPT", "GLOBAL_FILEDIR_OPT", @@ -1181,6 +1182,11 @@ POWER_DELAY_OPT = cli_option("--power-delay", dest="power_delay", type="float", default=constants.OOB_POWER_DELAY, help="Time in seconds to wait between power-ons") +FORCE_FILTER_OPT = cli_option("-F", "--filter", dest="force_filter", + action="store_true", default=False, + help=("Whether command argument should be treated" + " as filter")) + #: Options provided by all commands COMMON_OPTS = [DEBUG_OPT] -- 1.7.10.4