Skip to content

Commit 97dcf01

Browse files
committed
Add comments to empty except ValueError blocks in URL install
1 parent 1054708 commit 97dcf01

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/specify_cli/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4329,6 +4329,7 @@ def _validate_and_install_local(yaml_path: Path, source_label: str) -> None:
43294329
try:
43304330
src_loopback = ip_address(src_host).is_loopback
43314331
except ValueError:
4332+
# Host is not an IP literal (e.g., a DNS name); keep default non-loopback.
43324333
pass
43334334
if parsed_src.scheme != "https" and not (parsed_src.scheme == "http" and src_loopback):
43344335
console.print("[red]Error:[/red] Only HTTPS URLs are allowed, except HTTP for localhost.")
@@ -4345,6 +4346,7 @@ def _validate_and_install_local(yaml_path: Path, source_label: str) -> None:
43454346
try:
43464347
final_lb = ip_address(final_host).is_loopback
43474348
except ValueError:
4349+
# Redirect host is not an IP literal; keep loopback as determined above.
43484350
pass
43494351
if final_parsed.scheme != "https" and not (final_parsed.scheme == "http" and final_lb):
43504352
console.print(f"[red]Error:[/red] URL redirected to non-HTTPS: {final_url}")

0 commit comments

Comments
 (0)