Commit e68cd197 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Jérome Perrin

py2/py3: remove deprecated splitport().

use urlsplit instead, prepending '//' like discussed in https://bugs.python.org/issue27485#msg270215
parent 3759f70e
......@@ -11,11 +11,7 @@ import socket
import sys
from tempfile import TemporaryFile
import time
from six.moves.urllib.parse import quote
try:
from urllib import splitport
except ImportError: # six.PY3
from urllib.parse import splitport
from six.moves.urllib.parse import quote, urlsplit
from waitress.server import create_server
import ZConfig
......@@ -268,8 +264,7 @@ def runwsgi():
new_limit = (cur_limit[1], cur_limit[1])
resource.setrlimit(resource.RLIMIT_NOFILE, new_limit)
ip, port = splitport(args.address)
port = int(port)
port = urlsplit('//' + args.address).port
createServer(
app_wrapper(
large_file_threshold=args.large_file_threshold,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment