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",None) |
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 |
245 |
|
# write crab command to be executed later... |
246 |
|
cmd='crab ' |
247 |
|
for o in options: |
248 |
< |
if options[o]==None: options[o]="" |
249 |
< |
elif str(options[o])[0]=="-": options[o]='"\\'+str(options[o])+'"' |
250 |
< |
cmd+=str(o)+' '+str(options[o])+' ' |
248 |
> |
if options[o]==None: |
249 |
> |
cmd+=str(o)+' ' |
250 |
> |
else: |
251 |
> |
options[o] = ''.join(options[o].split()) |
252 |
> |
cmd+=str(o)+'='+str(options[o])+' ' |
253 |
> |
pass |
254 |
|
cmd+="\n" |
255 |
< |
# print cmd |
255 |
> |
#print cmd |
256 |
|
|
257 |
|
runFile.write(cmd) |
258 |
|
|