Mercurial > kallithea
changeset 5958:bf0a587334ea
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.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Fri, 10 Jun 2016 01:19:58 +0200 |
parents | 104ec4bfe449 |
children | e6fafb5ed70d |
files | kallithea/model/repo.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/model/repo.py Fri Jun 10 01:19:58 2016 +0200 +++ b/kallithea/model/repo.py Fri Jun 10 01:19:58 2016 +0200 @@ -774,4 +774,7 @@ 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)