summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compat.py2
-rw-r--r--testlib.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/compat.py b/compat.py
index 5fe9d47..7325087 100644
--- a/compat.py
+++ b/compat.py
@@ -69,8 +69,10 @@ if sys.version_info < (3, 0):
from cStringIO import StringIO
FileIO = file
BytesIO = StringIO
+ reload = reload
else:
from io import FileIO, BytesIO, StringIO
+ from imp import reload
# Where do pickles come from?
try:
diff --git a/testlib.py b/testlib.py
index e17b427..b1474ad 100644
--- a/testlib.py
+++ b/testlib.py
@@ -1935,7 +1935,7 @@ def create_files(paths, chroot):
if not osp.isdir(dirpath):
os.makedirs(dirpath)
for filepath in files:
- file(filepath, 'w').close()
+ open(filepath, 'w').close()
def enable_dbc(*args):
"""