projects
/
ais.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
9bbfbc0
)
Be more verbose on file creation error
author
Jean-Michel Nirgal Vourgère
<jmv@nirgal.com>
Tue, 12 Apr 2011 08:13:40 +0000
(08:13 +0000)
committer
Jean-Michel Nirgal Vourgère
<jmv@nirgal.com>
Tue, 12 Apr 2011 08:13:40 +0000
(08:13 +0000)
bin/ntools.py
patch
|
blob
|
history
diff --git
a/bin/ntools.py
b/bin/ntools.py
index c60fc8dc48b4473b160ca4bc2fae332fbbb97798..e5a30739635347dbb7345e40284401e79dd544df 100644
(file)
--- a/
bin/ntools.py
+++ b/
bin/ntools.py
@@
-3,6
+3,7
@@
from __future__ import division
import os
import calendar
+import logging
__all__ = [
'IPV4_IN_IPV6_PREFIX',
@@
-76,6
+77,7
@@
def open_with_mkdirs(filename, mode):
try:
return file(filename, mode)
except IOError, ioerr:
+ logging.warning("file(%s,%s): errno %s %s", filename, mode, ioerr.errno, ioerr.strerror)
# FIXME only if doesn't exists ...
#print 'Creating directory', os.path.dirname(filename)
os.makedirs(os.path.dirname(filename))