diff --git a/_scripts/sync-releases.py b/_scripts/sync-releases.py index d5836ce..6a3c3d8 100755 --- a/_scripts/sync-releases.py +++ b/_scripts/sync-releases.py @@ -65,7 +65,7 @@ class Docs: ) -class SyncReleasesException(Exception): +class SyncError(Exception): pass @@ -134,9 +134,7 @@ def main() -> None: expected_hash = artifact['digest'].replace('sha256:', '') found_hash = sha256(resp.content).hexdigest() if expected_hash != found_hash: - raise SyncReleasesException( - f'SHA-256 {found_hash} != {expected_hash}' - ) + raise SyncError(f'SHA-256 {found_hash} != {expected_hash}') # unpack docdir = DOCROOT / proj.docs.subdir diff --git a/demo/_synctiles.py b/demo/_synctiles.py index d8ba884..37fed19 100755 --- a/demo/_synctiles.py +++ b/demo/_synctiles.py @@ -213,7 +213,7 @@ class StatusMetadata(TypedDict): stamp: str | None -class SyncTilesException(Exception): +class SyncError(Exception): pass @@ -715,7 +715,7 @@ def retile_slide( # Tile slide slide_info = context['slides'].get(slide_relpath.as_posix()) if slide_info is None: - raise SyncTilesException(f'No such slide {slide_relpath}') + raise SyncError(f'No such slide {slide_relpath}') metadata = sync_slide( context['stamp'], storage, slide_relpath, slide_info, workers ) @@ -851,4 +851,4 @@ def finish_retile(ctxfile: TextIO, summarydir: Path) -> None: elif args.cmd == 'finish': finish_retile(args.context_file, args.summary_dir) else: - raise SyncTilesException('unimplemented subcommand') + raise SyncError('unimplemented subcommand')