Skip to contentSkip to conversation

knotty: ensure that directory for BB_CONSOLELOG exists before using it

PATCH Applied Martin Jansa 2 participants 2 messages Jul 30, 2012 – Aug 2, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 knotty: ensure that directory for BB_CONSOLELOG exists before using it

---
 lib/bb/ui/knotty.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
lib/bb/ui/knotty.py +1 -0
index 0167416..9f51823 100644
@@ -119,6 +119,7 @@ def main(server, eventHandler, tf = TerminalFilter):
     console.setFormatter(format)
     logger.addHandler(console)
     if consolelogfile:
+        bb.utils.mkdirhier(os.path.dirname(consolelogfile))
         consolelog = logging.FileHandler(consolelogfile)
         bb.msg.addDefaultlogFilter(consolelog)
         consolelog.setFormatter(format)
Signature · 1 line
1.7.8.6