Skip to content
Snippets Groups Projects
Commit 63b5039f authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

SW-588: quick bug fix: do case insensitive compare for image extentions

parent c4a52dba
No related branches found
No related tags found
No related merge requests found
...@@ -103,10 +103,10 @@ def parseJobXml(job_xml): ...@@ -103,10 +103,10 @@ def parseJobXml(job_xml):
job_dict['file_type'] = FILE_TYPE_UNSPECIFIED job_dict['file_type'] = FILE_TYPE_UNSPECIFIED
if 'sky' in job_dict['DataProduct'] or 'FITS' in job_dict['DataProduct']: #Not for FITS and HDF5 Images if any([extention.lower() in job_dict['DataProduct'].lower() for extention in ['sky', 'FITS']]): #Not for FITS and HDF5 Images
job_dict['FileName'] = job_dict['DataProduct'] job_dict['FileName'] = job_dict['DataProduct']
job_dict['file_type'] = FILE_TYPE_IMAGE job_dict['file_type'] = FILE_TYPE_IMAGE
elif '.tar' in job_dict['DataProduct']: elif '.tar' in job_dict['DataProduct'].lower():
job_dict['FileName'] = job_dict['DataProduct'] job_dict['FileName'] = job_dict['DataProduct']
else: else:
job_dict['FileName'] = job_dict['DataProduct'] + '.tar' job_dict['FileName'] = job_dict['DataProduct'] + '.tar'
......
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