mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 19:14:54 +02:00
Fix print() and xrange() for Python 3 (#5590)
This commit is contained in:
@@ -10,6 +10,8 @@ import sys
|
|||||||
|
|
||||||
import OpenSSL
|
import OpenSSL
|
||||||
|
|
||||||
|
from six.moves import xrange # pylint: disable=import-error,redefined-builtin
|
||||||
|
|
||||||
from acme import challenges
|
from acme import challenges
|
||||||
from acme import crypto_util
|
from acme import crypto_util
|
||||||
from acme import messages
|
from acme import messages
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import requests
|
|||||||
import zope.interface
|
import zope.interface
|
||||||
|
|
||||||
import six
|
import six
|
||||||
|
from six.moves import xrange # pylint: disable=import-error,redefined-builtin
|
||||||
|
|
||||||
from acme import crypto_util
|
from acme import crypto_util
|
||||||
from acme import errors as acme_errors
|
from acme import errors as acme_errors
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ from certbot_nginx import nginxparser
|
|||||||
def roundtrip(stuff):
|
def roundtrip(stuff):
|
||||||
success = True
|
success = True
|
||||||
for t in stuff:
|
for t in stuff:
|
||||||
print t
|
print(t)
|
||||||
if not os.path.isfile(t):
|
if not os.path.isfile(t):
|
||||||
continue
|
continue
|
||||||
with open(t, "r") as f:
|
with open(t, "r") as f:
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ from threading import Thread
|
|||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|
||||||
from pytest import mark
|
from pytest import mark
|
||||||
|
from six.moves import xrange # pylint: disable=redefined-builtin
|
||||||
|
|
||||||
|
|
||||||
@mark.skip
|
@mark.skip
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ def serve_forever(port=0):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
server = HTTPServer(('', port), SimpleHTTPRequestHandler)
|
server = HTTPServer(('', port), SimpleHTTPRequestHandler)
|
||||||
print 'Serving HTTP on {0} port {1} ...'.format(*server.server_address)
|
print('Serving HTTP on {0} port {1} ...'.format(*server.server_address))
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
server.serve_forever()
|
server.serve_forever()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user