]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/compat.py
compat: add range and use it in the vfs
[bup.git] / lib / bup / compat.py
index 51aabf8db38a4839ca8b5d47a9d31e83b113f84a..895a84a3da86ac65c63ba184e94c341cdef15d14 100644 (file)
@@ -1,5 +1,5 @@
 
-from __future__ import print_function
+from __future__ import absolute_import, print_function
 from traceback import print_exception
 import sys
 
@@ -11,6 +11,7 @@ py3 = py_maj >= 3
 
 if py3:
 
+    range = range
     str_type = str
 
     def add_ex_tb(ex):
@@ -26,6 +27,7 @@ if py3:
 
 else:  # Python 2
 
+    range = xrange
     str_type = basestring
 
     def add_ex_tb(ex):