From d248569ef8cbae2c13106dc1b52aa9c80ab355e9 Mon Sep 17 00:00:00 2001 From: Bernie Innocenti Date: Sat, 29 Aug 2009 19:51:10 +0200 Subject: [PATCH] Do not pass empty strings to os.makedirs() --- geekigeeki.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/geekigeeki.py b/geekigeeki.py index 4ae17b2..94439ab 100755 --- a/geekigeeki.py +++ b/geekigeeki.py @@ -418,7 +418,7 @@ class WikiFormatter: 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 = '' + msg + '' return msg @@ -784,7 +784,7 @@ class Page: 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) -- 2.25.1