puppetboard/utils.py: fix Python3 compatibility (#247)

If xrange() is not defined, alias it to range().
This commit is contained in:
Chris Boot
2016-06-07 01:09:23 +01:00
committed by Corey Hammerton
parent b7cd58ac2c
commit d471663880

View File

@@ -11,6 +11,12 @@ from pypuppetdb.errors import EmptyResponseError
from flask import abort from flask import abort
# Python 3 compatibility
try:
xrange
except NameError:
xrange = range
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
def jsonprint(value): def jsonprint(value):