mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 14:32:28 +03:00
build: do not crash if SVN URL pre-validation fails; log error
This is the problem: https://jenkins.debian.net/job/reproducible_fdroid_build_apps/704/console
This commit is contained in:
parent
c74dc730dd
commit
2cbde77798
1 changed files with 6 additions and 3 deletions
|
@ -1034,9 +1034,12 @@ class vcs_gitsvn(vcs):
|
|||
raise VCSException(_('HTTPS must be used with Subversion URLs!'))
|
||||
|
||||
# git-svn sucks at certificate validation, this throws useful errors:
|
||||
import requests
|
||||
r = requests.head(remote)
|
||||
r.raise_for_status()
|
||||
try:
|
||||
import requests
|
||||
r = requests.head(remote)
|
||||
r.raise_for_status()
|
||||
except Exception as e:
|
||||
raise VCSException('SVN certificate pre-validation failed: ' + str(e))
|
||||
location = r.headers.get('location')
|
||||
if location and not location.startswith('https://'):
|
||||
raise VCSException(_('Invalid redirect to non-HTTPS: {before} -> {after} ')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue