diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-09-29 16:43:24 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-09-29 16:43:24 -0400 |
commit | b3ee584418ee1502eabb616c012568034f2c478d (patch) | |
tree | f4d500171adaaf249b3ad4bfe1e84ef7cd3d85ce | |
parent | f19a7421dfeba7947d31d7a4e785ea50a0817feb (diff) | |
download | grokmirror-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-x | grokmirror/pull.py | 3 |
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)) |