projects
/
geekigeeki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b98f23f
)
Do not pass empty strings to os.makedirs()
author
Bernie Innocenti
<bernie@codewiz.org>
Sat, 29 Aug 2009 17:51:10 +0000
(19:51 +0200)
committer
Bernie Innocenti
<bernie@codewiz.org>
Sat, 29 Aug 2009 17:51:10 +0000
(19:51 +0200)
geekigeeki.py
patch
|
blob
|
history
diff --git
a/geekigeeki.py
b/geekigeeki.py
index 4ae17b2996fa0da6f7a0b336c7a1df8a69f81e7d..94439abf47df16a3ef21efb7baf2ba7632d35f02 100755
(executable)
--- 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:
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
if not self.in_html:
msg = '<strong class="error">' + msg + '</strong>'
return msg
@@
-784,7
+784,7
@@
class Page:
except OSError, err:
if err.errno != errno.ENOENT: raise err
path = os.path.split(name)[0]
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)
os.makedirs(path)
os.rename(tmp_filename, name)