Skip to content

Commit

Permalink
use name attr to get filename
Browse files Browse the repository at this point in the history
  • Loading branch information
alphasentaurii committed Jul 22, 2024
1 parent 6e40d33 commit c495a14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crds/roman/locate.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,8 @@ def reference_keys_to_dataset_keys(rmapping, header):
crds.core.exceptions.InvalidUseAfterFormat: Bad USEAFTER time format = 'bad user after'
"""
header = dict(header)
# parameter reference files and data models have dropped the "ROMAN" prefix
paramfile = True if len(str(os.path.basename(rmapping)).split("-")) > 1 else False
# if parameter reference file (contains "-"), there is no "ROMAN" prefix
paramfile = True if len(rmapping.name.split("-")) > 1 else False
prefix = "META" if paramfile is True else "ROMAN.META"
# Basic common pattern translations
translations = {
Expand Down

0 comments on commit c495a14

Please sign in to comment.