ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/multicrab.py
(Generate patch)

Comparing COMP/CRAB/python/multicrab.py (file contents):
Revision 1.17 by slacapra, Thu Nov 12 10:35:26 2009 UTC vs.
Revision 1.28 by slacapra, Fri Jul 2 15:42:15 2010 UTC

# Line 216 | Line 216 | class MultiCrab:
216                  
217                  options[tmp]=self.cfg_params_dataset[sec][opt]
218  
219 +            # check if user_remote_dir is set in multicrab.cfg
220 +            # protect against no user_remote_dir
221 +            self.user_remote_dir =self.cfg_params_dataset[sec].get("user.user_remote_dir",self.user_remote_dir)
222 +            if not self.user_remote_dir:
223 +                self.user_remote_dir = "./"
224              # add section to storage_path if exist in crab.cfg
225              if not self.cfg_params_dataset.has_key("USER.user_remote_dir") and self.user_remote_dir:
226                  options["-USER.user_remote_dir"]=self.user_remote_dir+"/"+sec
227 +            # print options["-USER.user_remote_dir"]
228              # also for ui_working_dir
229              if not self.cfg_params_dataset.has_key("USER.ui_working_dir") and self.ui_working_dir:
230                  options["-USER.ui_working_dir"]=self.ui_working_dir+"/"+sec
231 +            # if ui_working_dir is set, change -c dir accordnigly
232 +                if self.flag_continue:
233 +                    options['-c']=self.ui_working_dir+"/"+sec
234 +
235              # also for logDir
236              if not self.cfg_params_dataset.has_key("USER.logdir") and self.logdir:
237                  options["-USER.logdir"]=self.logdir+"/"+sec
# Line 239 | Line 249 | class MultiCrab:
249              # write crab command to be executed later...
250              cmd='crab '
251              for o in options:
252 <                if options[o]==None: options[o]=""
253 <                cmd+=str(o)+" "+str(options[o])+" "
252 >                if options[o]==None:
253 >                    cmd+=str(o)+' '
254 >                else:
255 >                    options[o] = ''.join(options[o].split())
256 >                    cmd+=str(o)+'='+str(options[o])+' '
257 >                pass
258              cmd+="\n"
259 <            # print cmd
259 >            #print cmd
260  
261              runFile.write(cmd)
262  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines