Misc. ruff fixes.
This commit is contained in:
+4
-2
@@ -188,10 +188,12 @@ def main() -> None:
|
||||
|
||||
zips = find_releasable_zips()
|
||||
if not zips:
|
||||
raise FileNotFoundError(
|
||||
print(
|
||||
"No clean-versioned ZIPs found in build/.\n"
|
||||
"Run scripts/winbuild.py first."
|
||||
"Run scripts/guibuild.py first.",
|
||||
file=sys.stderr,
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
# Validate all dist files exist before touching Gitea
|
||||
dist_files: dict[str, list[Path]] = {}
|
||||
|
||||
@@ -86,8 +86,7 @@ def parse_torrent(filepath: Path) -> TorrentInfo | None:
|
||||
|
||||
"""
|
||||
try:
|
||||
with Path(filepath).open("rb") as f:
|
||||
data = bencodepy.decode(f.read())
|
||||
data = bencodepy.decode(Path(filepath).read_bytes())
|
||||
except (OSError, ValueError, TypeError) as e:
|
||||
print(f"Error parsing {filepath}: {e}")
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user