HTTP check existing repositories
Instead of using git to check whether an existing opendev.org repository exists when and upstream source is specified, just use a simple HTTP check using urllib. This avoids any authentication style guesses git clients may make when a repo is not visible. Change-Id: Ibee29eee84ae3890a9017edf287de1415d658c39
This commit is contained in:
parent
bbdd63d457
commit
2c5223cf2d
@ -22,6 +22,8 @@ import re
|
||||
import shutil
|
||||
import sys
|
||||
import tempfile
|
||||
import urllib.error
|
||||
import urllib.request
|
||||
import yaml
|
||||
|
||||
|
||||
@ -221,8 +223,8 @@ def main():
|
||||
try:
|
||||
# Check to see if we have already imported the project into
|
||||
# OpenStack, if so skip checking upstream.
|
||||
check_repo(openstack_repo, default_branch)
|
||||
except git.exc.GitCommandError:
|
||||
urllib.request.urlopen(openstack_repo)
|
||||
except urllib.error.HTTPError:
|
||||
# We haven't imported the repo yet, make sure upstream is
|
||||
# valid.
|
||||
found_errors += check_repo(upstream, default_branch)
|
||||
|
Loading…
Reference in New Issue
Block a user