updated imports in tests
This commit is contained in:
+2
-2
@@ -10,7 +10,7 @@ Generates names for cache and session files
|
||||
--------------------------------------------
|
||||
"""
|
||||
import os
|
||||
|
||||
from gluon._compat import builtin
|
||||
|
||||
def generate(filename, depth=2, base=512):
|
||||
if os.path.sep in filename:
|
||||
@@ -62,4 +62,4 @@ def open(filename, mode="r", path=None):
|
||||
fullfilename = os.path.join(path, generate(filename))
|
||||
if mode.startswith('w') and not os.path.exists(os.path.dirname(fullfilename)):
|
||||
os.makedirs(os.path.dirname(fullfilename))
|
||||
return file(fullfilename, mode)
|
||||
return builtin.open(fullfilename, mode)
|
||||
|
||||
Reference in New Issue
Block a user