Skip to content
Snippets Groups Projects
Commit a4677863 authored by Wainer Vandelli's avatar Wainer Vandelli
Browse files

Fix merged name building

parent 52350a60
No related branches found
No related tags found
No related merge requests found
#!/bin/env python #!/bin/env python
__version__='$Revision:$' __version__='$Revision$'
# $Source$ # $Source$
from SFOFileNameParser import SFOFileNameParser from SFOFileNameParser import SFOFileNameParser
...@@ -69,13 +69,14 @@ Merged file name is: ...@@ -69,13 +69,14 @@ Merged file name is:
if not success: return False if not success: return False
### Create the two type of name we expect (neglecting attempt number) ### Create the two type of name we expect (neglecting attempt number)
notmerged = os.path.basename(castorfile).splitext()[0] notmerged = os.path.splitext(os.path.basename(castorfile))[0]
notmerged = notmerged.replace('.daq.','.merge.')
merged = '.'.join(notmerged.split('.',6)[:-1]+['_SFO-ALL._0001']) merged = '.'.join(notmerged.split('.',6)[:-1]+['_SFO-ALL._0001'])
### Find all the files with the correct name ### Find all the files with the correct name
files = [f for f in all_files.split('\n') files = [f for f in all_files.split('\n')
if f and (notmerged in f or merged in f)] if f and (notmerged in f or merged in f)]
if not files: return False if not files: return False
### Take the file with the highest attempt number ### Take the file with the highest attempt number
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment