replace rfc3987 library with urlparse

The former is GPL licensed.
This commit is contained in:
Jimmy Zelinskie 2016-05-26 13:29:48 -04:00
parent d71fbcab1f
commit 70f794b0af
3 changed files with 5 additions and 6 deletions

View file

@ -1,12 +1,13 @@
""" Create, list, cancel and get status/logs of repository builds. """ """ Create, list, cancel and get status/logs of repository builds. """
from urlparse import urlparse
import logging import logging
import json import json
import datetime import datetime
import hashlib import hashlib
from flask import request 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 app import app, userfiles as user_files, build_logs, log_archive, dockerfile_build_queue
from buildtrigger.basehandler import BuildTriggerHandler from buildtrigger.basehandler import BuildTriggerHandler
@ -220,14 +221,14 @@ class RepositoryBuildList(RepositoryParamResource):
if archive_url: if archive_url:
archive_match = None archive_match = None
try: try:
archive_match = uri_parse(archive_url, 'URI') archive_match = urlparse(archive_url)
except ValueError: except ValueError:
pass pass
if not archive_match: if not archive_match:
raise InvalidRequest('Invalid Archive URL: Must be a valid URI') 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': if scheme != 'http' and scheme != 'https':
raise InvalidRequest('Invalid Archive URL: Must be http or https') raise InvalidRequest('Invalid Archive URL: Must be http or https')

View file

@ -54,7 +54,6 @@ Flask-Testing
pyjwt pyjwt
toposort toposort
pyjwkest pyjwkest
rfc3987
jsonpath-rw jsonpath-rw
bintrees bintrees
redlock redlock

View file

@ -101,7 +101,6 @@ reportlab==2.7
requests==2.9.1 requests==2.9.1
requests-oauthlib==0.6.1 requests-oauthlib==0.6.1
-e git+https://github.com/coreos/resumablehashlib.git@b1b631249589b07adf40e0ee545b323a501340b4#egg=resumablehashlib -e git+https://github.com/coreos/resumablehashlib.git@b1b631249589b07adf40e0ee545b323a501340b4#egg=resumablehashlib
rfc3987==1.3.5
semantic-version==2.5.0 semantic-version==2.5.0
six==1.10.0 six==1.10.0
SQLAlchemy==1.0.12 SQLAlchemy==1.0.12