formatting

This commit is contained in:
Sami Khan
2026-01-30 15:32:57 +05:00
parent 1ed6ae4fc4
commit 4d74574edd
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -333,7 +333,9 @@ class API:
# stdout/stderr pipe fds. Using PIPE would cause communicate() to hang
# because the daemon child never closes them. Use DEVNULL instead.
is_daemonize = "--daemonize" in cmd_str
out_mode = asyncio.subprocess.DEVNULL if is_daemonize else asyncio.subprocess.PIPE
out_mode = (
asyncio.subprocess.DEVNULL if is_daemonize else asyncio.subprocess.PIPE
)
if needs_shell:
process = await asyncio.create_subprocess_shell(
@@ -120,7 +120,7 @@ def place_flash_instance(
# Prefer private network IPs (10.x, 192.168.x) over Tailscale CGNAT (100.64-127.x)
chosen_ip: str | None = None
for ip in candidate_ips:
if ip.startswith("10.") or ip.startswith("192.168."):
if ip.startswith(("10.", "192.168.")):
chosen_ip = ip
break
if chosen_ip is None and candidate_ips: