From 1eb56ef02a7fa825be99ddfb95f217a07dab1cdf Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 11 Nov 2012 14:38:56 -0500 Subject: - first pass at running a py3k compatible base in py2k as well. having some weird unicode issues I can't debug; the meaning of str.encode() seems to be changing globally somehow --- mako/ext/turbogears.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mako/ext/turbogears.py') diff --git a/mako/ext/turbogears.py b/mako/ext/turbogears.py index e453ada..74fcd8a 100644 --- a/mako/ext/turbogears.py +++ b/mako/ext/turbogears.py @@ -19,7 +19,7 @@ class TGPlugin(object): # Pull the options out and initialize the lookup lookup_options = {} - for k, v in options.iteritems(): + for k, v in options.items(): if k.startswith('mako.'): lookup_options[k[5:]] = v elif k in ['directories', 'filesystem_checks', 'module_directory']: @@ -46,7 +46,7 @@ class TGPlugin(object): return self.lookup.get_template(templatename) def render(self, info, format="html", fragment=False, template=None): - if isinstance(template, basestring): + if isinstance(template, str): template = self.load_template(template) # Load extra vars func if provided -- cgit v1.2.3