# HG changeset patch # User Mads Kiilerich # Date 2016-06-10 01:19:58 # Node ID bf0a587334eaaa891f580150c8135be9eb84d239 # Parent 104ec4bfe4493c82a4d5042945ef0507547347b0 repo: better handling of situation where there is no repo to remove Change internal method _delete_filesystem_repo. We should never end up in such situations, but this helps debugging if it should happen. diff --git a/kallithea/model/repo.py b/kallithea/model/repo.py --- a/kallithea/model/repo.py +++ b/kallithea/model/repo.py @@ -774,4 +774,7 @@ class RepoModel(BaseModel): if repo.group: args = repo.group.full_path_splitted + [_d] _d = os.path.join(*args) - shutil.move(rm_path, safe_str(os.path.join(self.repos_path, _d))) + if os.path.exists(rm_path): + shutil.move(rm_path, safe_str(os.path.join(self.repos_path, _d))) + else: + log.error("Can't find repo to delete in %r", rm_path)