summaryrefslogtreecommitdiff
path: root/tablib/compat.py
diff options
context:
space:
mode:
authorThomas Anthony <anthony.p.tommy@gmail.com>2015-05-26 20:06:42 -0700
committerThomas Anthony <anthony.p.tommy@gmail.com>2015-05-26 20:06:42 -0700
commitb3485ec942d77ec38775a9dbfcae19bbebf55313 (patch)
tree340cc2c04d47d275ecb90f0d295930fba2ffcbde /tablib/compat.py
parent24657520e9ebd6c492fd4f81e42fb427febcc972 (diff)
downloadtablib-b3485ec942d77ec38775a9dbfcae19bbebf55313.tar.gz
Fixed a compatibility bug for Python 3 by adding xrange to
compat.py. The code in tablib/formats/_xls.py used xrange in parsing excel spreadsheets. xrange is not a builtin for Python 3, so I've added xrange = range in compat.py and imported it in tablib/formats/_xls.py.
Diffstat (limited to 'tablib/compat.py')
-rw-r--r--tablib/compat.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tablib/compat.py b/tablib/compat.py
index d4582d5..e03526d 100644
--- a/tablib/compat.py
+++ b/tablib/compat.py
@@ -37,6 +37,7 @@ if is_py3:
unicode = str
bytes = bytes
basestring = str
+ xrange = range
else:
from cStringIO import StringIO as BytesIO
@@ -53,3 +54,4 @@ else:
import tablib.packages.dbfpy as dbfpy
unicode = unicode
+ xrange = xrange