[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[minion-cvs] Server tweaks: Create parent dirs as needed; accept add...



Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.mit.edu:/tmp/cvs-serv32349/lib/mixminion

Modified Files:
	Common.py 
Log Message:
Server tweaks: Create parent dirs as needed; accept additional command line options. [Bug 20]

Index: Common.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/Common.py,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -d -r1.118 -r1.119
--- Common.py	25 Nov 2003 02:14:33 -0000	1.118
+++ Common.py	25 Nov 2003 03:42:31 -0000	1.119
@@ -789,7 +789,7 @@
         try:
             parent = os.path.split(self.fname)[0]
             if not os.path.exists(parent):
-                createPrivateDir(parent)
+                os.mkdirs(parent, 0700)
             self.file = open(self.fname, 'a')
         except OSError, e:
             self.file = None
@@ -867,8 +867,8 @@
             self.setMinSeverity("WARN")
             self.addHandler(_ConsoleLogHandler(sys.stderr))
         else:
+            #DOCDOC
             self.setMinSeverity(config['Server'].get('LogLevel', "WARN"))
-            #XXXX006 ensure parent.
             logfile = config.getLogFile()
             self.addHandler(_ConsoleLogHandler(sys.stderr))
             if logfile:
@@ -876,7 +876,7 @@
                     self.addHandler(_FileLogHandler(logfile))
                 except MixError, e:
                     self.error(str(e))
-                if keepStderr:
+                if keepStderr or config['Server'].get('EchoMessages',0)==2:
                     return
                 if (config['Server'].get('Daemon',0) or
                     not config['Server'].get('EchoMessages',0)):