fixed basestring in template.py filenames, thanks appjarbiz
This commit is contained in:
+1
-1
Submodule gluon/packages/dal updated: f523a24812...b4114ea55d
+2
-2
@@ -18,7 +18,7 @@ import os
|
|||||||
import cgi
|
import cgi
|
||||||
import logging
|
import logging
|
||||||
from re import compile, sub, escape, DOTALL
|
from re import compile, sub, escape, DOTALL
|
||||||
from gluon._compat import StringIO, unicodeT, to_unicode, to_bytes, to_native
|
from gluon._compat import StringIO, unicodeT, to_unicode, to_bytes, to_native, basestring
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# have web2py
|
# have web2py
|
||||||
@@ -778,7 +778,7 @@ def parse_template(filename,
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# First, if we have a str try to open the file
|
# First, if we have a str try to open the file
|
||||||
if isinstance(filename, str):
|
if isinstance(filename, basestring):
|
||||||
fname = os.path.join(path, filename)
|
fname = os.path.join(path, filename)
|
||||||
try:
|
try:
|
||||||
with open(fname, 'rb') as fp:
|
with open(fname, 'rb') as fp:
|
||||||
|
|||||||
Reference in New Issue
Block a user