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>
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 @@
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))