Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9340638
D4131.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
762 B
Subscribers
None
D4131.diff
View Options
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
Details
Attached
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
Attached To
D4131: Remove parse_url helper that adds no real value
Event Timeline
Log In to Comment