diff --git a/files/mirror_project_in.py b/files/mirror_project_in.py index cfca629..ba04f2f 100644 --- a/files/mirror_project_in.py +++ b/files/mirror_project_in.py @@ -34,7 +34,10 @@ def main(check=False, debug=False): for project in projects: if debug: print("Mirrorring %s" % project.fullname) - pagure.lib.git.mirror_pull_project(session, project, debug=debug) + try: + pagure.lib.git.mirror_pull_project(session, project, debug=debug) + except Exception as err: + print("ERROR: %s" % err) session.remove() if debug: diff --git a/pagure/lib/git.py b/pagure/lib/git.py index 31253c1..c0e6d02 100644 --- a/pagure/lib/git.py +++ b/pagure/lib/git.py @@ -2846,6 +2846,9 @@ def generate_archive(project, commit, tag, name, archive_fmt): def mirror_pull_project(session, project, debug=False): """ Mirror locally a project from a remote URL. """ remote = project.mirrored_from + if not remote: + _log.info("No remote found, ignoring") + return repopath = tempfile.mkdtemp(prefix="pagure-mirror_in-") lclrepopath = pagure.utils.get_repo_path(project)