aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-09-29 16:43:24 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-09-29 16:43:24 -0400
commitb3ee584418ee1502eabb616c012568034f2c478d (patch)
treef4d500171adaaf249b3ad4bfe1e84ef7cd3d85ce
parentf19a7421dfeba7947d31d7a4e785ea50a0817feb (diff)
downloadgrokmirror-b3ee584418ee1502eabb616c012568034f2c478d.tar.gz
Don't set up a non-existent altrepo
We may not have an altrepo, so don't set one up if it's none. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rwxr-xr-xgrokmirror/pull.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/grokmirror/pull.py b/grokmirror/pull.py
index 0209915..1f9f38c 100755
--- a/grokmirror/pull.py
+++ b/grokmirror/pull.py
@@ -298,7 +298,8 @@ def pull_worker(config, q_pull, q_spa, q_done):
grokmirror.setup_bare_repo(fullpath)
fix_remotes(toplevel, gitdir, site, config)
set_repo_params(fullpath, repoinfo)
- grokmirror.set_altrepo(fullpath, altrepo)
+ if altrepo:
+ grokmirror.set_altrepo(fullpath, altrepo)
action = 'pull'
except (PermissionError, IOError) as ex:
logger.critical('Unable to remove %s: %s', fullpath, str(ex))