Skip to content

Commit

Permalink
Fix error on no-op mirror sync
Browse files Browse the repository at this point in the history
backports: #8999
https://pulp.plan.io/issues/8999

fixes #9060

(cherry picked from commit f73bc65)
  • Loading branch information
David Davis authored and daviddavis committed Jul 21, 2021
1 parent 02c8767 commit 123a437
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES/9060.bugfix
@@ -0,0 +1,2 @@
Fix an issue where "mirror=True" syncs of a repository which has already been synced, and has not changed since the last sync, would fail.
(backported from #8999)
2 changes: 1 addition & 1 deletion pulp_file/app/tasks/synchronizing.py
Expand Up @@ -48,7 +48,7 @@ def synchronize(remote_pk, repository_pk, mirror):
first_stage = FileFirstStage(remote)
dv = DeclarativeVersion(first_stage, repository, mirror=mirror)
rv = dv.create()
if mirror:
if rv and mirror:
# TODO: this is awful, we really should rewrite the DeclarativeVersion API to
# accomodate this use case
global metadata_files
Expand Down

0 comments on commit 123a437

Please sign in to comment.