Commit 245d101d 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 9e244815
...@@ -11,11 +11,7 @@ import socket ...@@ -11,11 +11,7 @@ import socket
import sys import sys
from tempfile import TemporaryFile from tempfile import TemporaryFile
import time import time
from six.moves.urllib.parse import quote from six.moves.urllib.parse import quote, urlsplit
try:
from urllib import splitport
except ImportError: # six.PY3
from urllib.parse import splitport
from waitress.server import create_server from waitress.server import create_server
import ZConfig import ZConfig
...@@ -268,8 +264,7 @@ def runwsgi(): ...@@ -268,8 +264,7 @@ def runwsgi():
new_limit = (cur_limit[1], cur_limit[1]) new_limit = (cur_limit[1], cur_limit[1])
resource.setrlimit(resource.RLIMIT_NOFILE, new_limit) resource.setrlimit(resource.RLIMIT_NOFILE, new_limit)
ip, port = splitport(args.address) port = urlsplit('//' + args.address).port
port = int(port)
createServer( createServer(
app_wrapper( app_wrapper(
large_file_threshold=args.large_file_threshold, 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