From abebc55cdd7cc2f9bf150cf4197ed6c4744de964 Mon Sep 17 00:00:00 2001 From: sienkiew Date: Fri, 7 Oct 2011 14:23:25 +0000 Subject: checkpoint git-svn-id: https://svn.stsci.edu/svn/ssb/etal/steuermann/trunk@439 d34015c8-bcbb-4646-8ac8-8ba5febf221d --- steuermann/run.py | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'steuermann/run.py') diff --git a/steuermann/run.py b/steuermann/run.py index e83fca2..63900dd 100644 --- a/steuermann/run.py +++ b/steuermann/run.py @@ -53,9 +53,6 @@ class runner(object): # index of nodes node_index = None - # dir where we write our logs - logdir = '' - # host_info_cache = None @@ -65,18 +62,17 @@ class runner(object): ##### # - def __init__( self, nodes, logdir ) : + def __init__( self, nodes ) : self.all_procs = { } self.node_index = nodes self.load_host_info() - self.logdir = logdir self.host_info_cache = { } self.howmany = { } ##### # start a process - def run( self, node, run_name, no_run = False, logfile_name = None ): + def run( self, node, run_name, logfile_name, no_run = False ): try : try : @@ -144,13 +140,6 @@ class runner(object): if debug : print "RUN",run - if logfile_name is None : - # make sure the log directory is there - logdir= self.logdir + "/%s"%(run_name) - - # create a name for the log file, but do not use / in the name - logfile_name = "%s/%s.log"%( logdir, node.name.replace('/','.') ) - try : os.makedirs( os.path.dirname(logfile_name) ) except OSError, e : @@ -160,6 +149,7 @@ class runner(object): raise # open the log file, write initial notes + print "LOGFILE",logfile_name logfile=open(logfile_name,"w") logfile.write('%s %s\n'%(datetime.datetime.now(),run)) logfile.flush() -- cgit