Commits

Shawn Booth authored 865cb4e0054
PIPE-2286: modified 'after_deterministic_flagging' check to use the locally defined dictionary
No tags

pipeline/h/tasks/exportdata/exportdata.py

Modified
789 789 # more information about flagmanager return dictionary here:
790 790 # https://casadocs.readthedocs.io/en/stable/api/tt/casatasks.flagging.flagmanager.html#mode
791 791 flag_dict.pop('MS', None)
792 792 flag_dict = {x['name']:x['comment'] for x in flag_dict.values()}
793 793
794 794 # Define the versions list file to be saved
795 795 # Define the directory to be saved, and where to store in tar archive.
796 796 if not isinstance(flag_version_name, list):
797 797 flag_version_name = [flag_version_name]
798 798 # PIPE-933: Add flag version 'after_deterministic_flagging' to tarfile
799 - if "hifa" in context.project_structure.recipe_name and "after_deterministic_flagging" not in flag_version_name:
799 + if "after_deterministic_flagging" in flag_dict and "after_deterministic_flagging" not in flag_version_name:
800 800 flag_version_name.append("after_deterministic_flagging")
801 801
802 802 # Create the tar file and populate it
803 803 tar = tarfile.open(os.path.join(products_dir, tarfilename), "w:gz")
804 804
805 805 line = ""
806 806 for f in flag_version_name:
807 807 LOG.info('Saving flag version %s', f)
808 808 flagsname = os.path.join(vis + '.flagversions', 'flags.' + f)
809 809 flagsarcname = os.path.join(visname + '.flagversions', 'flags.' + f)

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut