The --print-url/--no-print-url options allow enabling or disabling the
printing of the target URL to stderr. Printing is on by default.
"--no-print-url" is useful in scripts, where we want actual errors to
pop in stderr, but not "URL:" lines.
Suggested-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Julien Floret <julien.floret@6wind.com>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
dlrepo-cli | 34 ++++++++++++++++++++++++++++------
1 file changed, 28 insertions(+), 6 deletions(-)
diff --git a/dlrepo-cli b/dlrepo-cli
index 1396ba80993d..cd117b7e01cb 100755
--- a/dlrepo-cli+++ b/dlrepo-cli
@@ -80,6 +80,22 @@ def main():
More verbose output.
""",
)
+ parser.add_argument(+ "--print-url",+ action="store_true",+ help="""+ Print the target URL.+ """,+ )+ parser.add_argument(+ "--no-print-url",+ dest="print_url",+ action="store_false",+ help="""+ Do not print the target URL.+ """,+ )+ parser.set_defaults(print_url=True)