replace rfc3987 library with urlparse
The former is GPL licensed.
This commit is contained in:
parent
d71fbcab1f
commit
70f794b0af
3 changed files with 5 additions and 6 deletions
|
@ -1,18 +1,19 @@
|
|||
""" Create, list, cancel and get status/logs of repository builds. """
|
||||
|
||||
from urlparse import urlparse
|
||||
|
||||
import logging
|
||||
import json
|
||||
import datetime
|
||||
import hashlib
|
||||
|
||||
from flask import request
|
||||
from rfc3987 import parse as uri_parse
|
||||
|
||||
from app import app, userfiles as user_files, build_logs, log_archive, dockerfile_build_queue
|
||||
from buildtrigger.basehandler import BuildTriggerHandler
|
||||
from endpoints.api import (RepositoryParamResource, parse_args, query_param, nickname, resource,
|
||||
require_repo_read, require_repo_write, validate_json_request,
|
||||
ApiResource, internal_only, format_date, api, path_param,
|
||||
ApiResource, internal_only, format_date, api, path_param,
|
||||
require_repo_admin)
|
||||
from endpoints.exception import Unauthorized, NotFound, InvalidRequest
|
||||
from endpoints.building import start_build, PreparedBuild
|
||||
|
@ -220,14 +221,14 @@ class RepositoryBuildList(RepositoryParamResource):
|
|||
if archive_url:
|
||||
archive_match = None
|
||||
try:
|
||||
archive_match = uri_parse(archive_url, 'URI')
|
||||
archive_match = urlparse(archive_url)
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
if not archive_match:
|
||||
raise InvalidRequest('Invalid Archive URL: Must be a valid URI')
|
||||
|
||||
scheme = archive_match.get('scheme', None)
|
||||
scheme = archive_match.scheme
|
||||
if scheme != 'http' and scheme != 'https':
|
||||
raise InvalidRequest('Invalid Archive URL: Must be http or https')
|
||||
|
||||
|
|
|
@ -54,7 +54,6 @@ Flask-Testing
|
|||
pyjwt
|
||||
toposort
|
||||
pyjwkest
|
||||
rfc3987
|
||||
jsonpath-rw
|
||||
bintrees
|
||||
redlock
|
||||
|
|
|
@ -101,7 +101,6 @@ reportlab==2.7
|
|||
requests==2.9.1
|
||||
requests-oauthlib==0.6.1
|
||||
-e git+https://github.com/coreos/resumablehashlib.git@b1b631249589b07adf40e0ee545b323a501340b4#egg=resumablehashlib
|
||||
rfc3987==1.3.5
|
||||
semantic-version==2.5.0
|
||||
six==1.10.0
|
||||
SQLAlchemy==1.0.12
|
||||
|
|
Reference in a new issue