@@ -387,23 +387,36 @@ def validate(self):
387
387
missingKeywords .append (item )
388
388
389
389
if len (missingKeywords ):
390
- return (False , 'Error in %s.outputfilenameformat field : missing keywords %s ' % (_getName (self ), ',' .join (missingKeywords )))
390
+ return (
391
+ False , 'Error in %s.outputfilenameformat field : missing keywords %s ' %
392
+ (_getName (self ), ',' .join (missingKeywords )))
391
393
392
394
if isSplitJob is False and self .outputfilenameformat .find ('{sjid}' ) > - 1 :
393
- return (False , 'Error in %s.outputfilenameformat field : job is non-split, but {\' sjid\' } keyword found' % _getName (self ))
395
+ return (
396
+ False ,
397
+ 'Error in %s.outputfilenameformat field : job is non-split, but {\' sjid\' } keyword found' %
398
+ _getName (self ))
394
399
395
400
if isJob is False and self .outputfilenameformat .find ('{sjid}' ) > - 1 :
396
- return (False , 'Error in %s.outputfilenameformat field : no parent job, but {\' sjid\' } keyword found' % _getName (self ))
401
+ return (
402
+ False ,
403
+ 'Error in %s.outputfilenameformat field : no parent job, but {\' sjid\' } keyword found' %
404
+ _getName (self ))
397
405
398
406
if isJob is False and self .outputfilenameformat .find ('{jid}' ) > - 1 :
399
- return (False , 'Error in %s.outputfilenameformat field : no parent job, but {\' jid\' } keyword found' % _getName (self ))
407
+ return (
408
+ False ,
409
+ 'Error in %s.outputfilenameformat field : no parent job, but {\' jid\' } keyword found' %
410
+ _getName (self ))
400
411
401
412
invalidUnixChars = ['"' , ' ' ]
402
413
test = self .outputfilenameformat .replace ('{jid}' , 'a' ).replace ('{sjid}' , 'b' ).replace ('{fname}' , 'c' )
403
414
404
415
for invalidUnixChar in invalidUnixChars :
405
416
if test .find (invalidUnixChar ) > - 1 :
406
- return (False , 'Error in %s.outputfilenameformat field : invalid char %s found' % (_getName (self ), invalidUnixChar ))
417
+ return (
418
+ False , 'Error in %s.outputfilenameformat field : invalid char %s found' %
419
+ (_getName (self ), invalidUnixChar ))
407
420
408
421
return (True , '' )
409
422
@@ -438,9 +451,13 @@ def getWNInjectedScript(self, outputFiles, indent, patternsToZip, postProcessLoc
438
451
if outputFile .outputfilenameformat is not None and outputFile .outputfilenameformat != '' :
439
452
outputfilenameformat = outputFile .outputfilenameformat
440
453
441
- massStorageCommands .append (['massstorage' , outputFile .namePattern , outputfilenameformat ,
442
- massStorageConfig ['mkdir_cmd' ], massStorageConfig ['cp_cmd' ],
443
- massStorageConfig ['ls_cmd' ], os .path .expanduser (os .path .expandvars (massStorageConfig ['path' ]))])
454
+ massStorageCommands .append (['massstorage' ,
455
+ outputFile .namePattern ,
456
+ outputfilenameformat ,
457
+ massStorageConfig ['mkdir_cmd' ],
458
+ massStorageConfig ['cp_cmd' ],
459
+ massStorageConfig ['ls_cmd' ],
460
+ os .path .expanduser (os .path .expandvars (massStorageConfig ['path' ]))])
444
461
445
462
script_location = os .path .join (os .path .dirname (os .path .abspath (inspect .getfile (inspect .currentframe ()))),
446
463
'scripts/MassStorageFileWNScript.py.template' )
0 commit comments