puppetboard/utils.py: fix Python3 compatibility (#247)
If xrange() is not defined, alias it to range().
This commit is contained in:
committed by
Corey Hammerton
parent
b7cd58ac2c
commit
d471663880
@@ -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):
|
||||||
|
|||||||
Reference in New Issue
Block a user