Skip to content

Commit

Permalink
style: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Melkor333 committed Dec 19, 2024
1 parent a31a4d0 commit f825e62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions pyaptly/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def publish_cmd_update(cfg, publish_name, publish_config, ignore_existing=False)
# TODO: Fail gracefully and show an error when there is no existing publish
try:
current_snapshots = state_reader.state_reader().publish_map()[publish_fullname]
except KeyError: # pragma: no cover
except KeyError: # pragma: no cover
util.exit_with_error(f"The publish {publish_fullname} hasn't been created yet.")
if "snapshots" in publish_config:
snapshots_config = publish_config["snapshots"]
Expand Down Expand Up @@ -140,7 +140,10 @@ def publish_cmd_update(cfg, publish_name, publish_config, ignore_existing=False)
current_snapshot = snap_name
break
if current_snapshot is None:
lg.warning("Snapshot %s doesn't exist on to-be archived publish %s." % (snap["name"], publish_fullname))
lg.warning(
"Snapshot %s doesn't exist on to-be archived publish %s."
% (snap["name"], publish_fullname)
)
else:
snapshot.clone_snapshot(current_snapshot, archive).execute()

Expand Down
2 changes: 1 addition & 1 deletion pyaptly/tests/test_publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def test_publish_update_wrong_snapshots(config, publish_create, freeze):
freeze.move_to("2012-10-11 10:10:10")
args = ["-c", config, "snapshot", "create"]
main.main(args)
args = ["-c", config.replace('.toml','-bad.toml'), "publish", "update"]
args = ["-c", config.replace(".toml", "-bad.toml"), "publish", "update"]
main.main(args)
state = state_reader.SystemStateReader()
expect = set(
Expand Down

0 comments on commit f825e62

Please sign in to comment.