Skip to content

Commit

Permalink
Fix print() and xrange() for Python 3 (#5590)
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored and ohemorange committed Mar 14, 2018
1 parent 9ea14d2 commit e405aaa
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

import OpenSSL

from six.moves import xrange # pylint: disable=import-error,redefined-builtin

from acme import challenges
from acme import crypto_util
from acme import messages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import zope.interface

import six
from six.moves import xrange # pylint: disable=import-error,redefined-builtin

from acme import crypto_util
from acme import errors as acme_errors
Expand Down
2 changes: 1 addition & 1 deletion certbot-compatibility-test/nginx/roundtrip.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
def roundtrip(stuff):
success = True
for t in stuff:
print t
print(t)
if not os.path.isfile(t):
continue
with open(t, "r") as f:
Expand Down
1 change: 1 addition & 0 deletions letsencrypt-auto-source/tests/auto_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from unittest import TestCase

from pytest import mark
from six.moves import xrange # pylint: disable=redefined-builtin


@mark.skip
Expand Down
2 changes: 1 addition & 1 deletion tools/simple_http_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def serve_forever(port=0):
"""
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()
server.serve_forever()

Expand Down

0 comments on commit e405aaa

Please sign in to comment.