From 2a00bdd3c96c61d1d0541ff82800756dd6843854 Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 10 Apr 2019 21:39:28 +0800 Subject: [PATCH] wrong loop --- repo.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/repo.py b/repo.py index bc41896..76155e1 100755 --- a/repo.py +++ b/repo.py @@ -262,11 +262,14 @@ def _update(overwrite=False): if nlocation.exists(): logger.warning(f'Overwriting {nlocation}') else: + should_continue = False for nlocation in (pkg_nlocation, sig_nlocation): if nlocation.exists(): logger.warning('Same version is already in the repo.') throw_away(pkg_to_add) - continue + should_continue = True + if should_continue: + continue copyfile(pkg_to_add, pkg_nlocation) copyfile(sigfile, sig_nlocation) archive_pkg(pkg_to_add)