Page MenuHomeSoftware Heritage

D4131.diff
No OneTemporary

D4131.diff

diff --git a/swh/scanner/cli.py b/swh/scanner/cli.py
--- a/swh/scanner/cli.py
+++ b/swh/scanner/cli.py
@@ -28,15 +28,6 @@
}
-def parse_url(url):
- """CLI-specific helper to 'autocomplete' the provided url."""
- if not url.startswith("https://"):
- url = "https://" + url
- if not url.endswith("/"):
- url += "/"
- return url
-
-
@swh_cli_group.group(name="scanner", context_settings=CONTEXT_SETTINGS)
@click.option(
"-C",
@@ -107,7 +98,9 @@
config = ctx.obj["config"]
if api_url:
- config["web-api"]["url"] = parse_url(api_url)
+ if not api_url.endswith("/"):
+ api_url += "/"
+ config["web-api"]["url"] = api_url
scan(config, root_path, patterns, out_fmt, interactive)

File Metadata

Mime Type
text/plain
Expires
Thu, Jul 3, 10:56 AM (4 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3225053

Event Timeline