From 7075af7290abd4f59aa91c64ab0a9f17e61d147f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Michel=20Nirgal=20Vourg=C3=A8re?= Date: Tue, 12 Apr 2011 08:13:40 +0000 Subject: [PATCH] Be more verbose on file creation error --- bin/ntools.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/ntools.py b/bin/ntools.py index c60fc8d..e5a3073 100644 --- 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)) -- 2.30.2