Skip to content

fix(cli): add check=True to ensure-libvirt-session-config + timeout=10 to urlopen calls - #15

Merged
castrojo merged 1 commit into
mainfrom
fix/issue-12-subprocess-urlopen-safety
Jun 22, 2026
Merged

fix(cli): add check=True to ensure-libvirt-session-config + timeout=10 to urlopen calls#15
castrojo merged 1 commit into
mainfrom
fix/issue-12-subprocess-urlopen-safety

Conversation

@castrojo

Copy link
Copy Markdown
Contributor

Fixes two pre-existing bugs from issue #12.

Bug 1: setup_vms prints success even when libvirt session config fails

subprocess.run(['/usr/libexec/ensure-libvirt-session-config']) had no check=True. Added check=True so a non-zero exit propagates as CalledProcessError instead of silently printing 'VM stack ready'.

Bug 2: changelogs hangs indefinitely when GitHub is unreachable

Both urlopen calls had no timeout. Added timeout=10 to each. socket.timeout is a subclass of urllib.error.URLError so existing error handlers catch it.

Also applies the Python 3.14 CI bump from renovate PR #2 (which has a merge conflict) so that PR can be closed.

Closes #12

…0 to urlopen calls

Fixes two pre-existing bugs reported in issue #12:
- setup_vms: subprocess.run missing check=True on ensure-libvirt-session-config,
  causing false success when the config script fails
- changelogs: urlopen calls missing timeout, hanging forever when GitHub unreachable

Also bumps release.yml to Python 3.14 (closes renovate PR #2).

Assisted-by: Claude Sonnet 4.6 via GitHub Copilot CLI
Co-authored-by: Claude <claude@anthropic.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@castrojo
castrojo merged commit 64f5360 into main Jun 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(cli): setup_vms missing check=True on ensure-libvirt-session-config + urlopen missing timeout

1 participant