macro = globals().get('_macro_' + args[0])
return macro(*args, **kvargs)
except Exception, e:
- msg = cgi.escape(word) + ": " + cgi.escape(e.message)
+ msg = cgi.escape(word) + ": " + cgi.escape(str(e))
if not self.in_html:
msg = '<strong class="error">' + msg + '</strong>'
return msg
except OSError, err:
if err.errno != errno.ENOENT: raise err
path = os.path.split(name)[0]
- if not os.path.exists(path):
+ if path and not os.path.exists(path):
os.makedirs(path)
os.rename(tmp_filename, name)