Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MAINT: address improper error handling and cleanup for spin #26304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions .spin/cmds.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import os
import shutil
import sys
import argparse
import tempfile
import pathlib
import shutil
import json
import pathlib
import importlib
import subprocess
Expand Down Expand Up @@ -621,16 +617,10 @@ def notes(ctx, version_override):
)
# towncrier build --version 2.1 --yes
cmd = ["towncrier", "build", "--version", version, "--yes"]
try:
p = util.run(
cmd=cmd,
sys_exit=False,
output=True,
encoding="utf-8"
)
except subprocess.SubprocessError as e:
p = util.run(cmd=cmd, sys_exit=False, output=True, encoding="utf-8")
if p.returncode != 0:
raise click.ClickException(
f"`towncrier` failed returned {e.returncode} with error `{e.stderr}`"
f"`towncrier` failed returned {p.returncode} with error `{p.stderr}`"
)

output_path = project_config['tool.towncrier.filename'].format(version=version)
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,10 @@ cli = 'vendored-meson/meson/meson.py'
".spin/cmds.py:lint",
]
"Environments" = [
"spin.cmds.meson.run", ".spin/cmds.py:ipython",
".spin/cmds.py:python", "spin.cmds.meson.gdb",
"spin.cmds.meson.run",
".spin/cmds.py:ipython",
".spin/cmds.py:python",
"spin.cmds.meson.gdb",
"spin.cmds.meson.lldb"
]
"Documentation" = [
Expand Down