Skip to content

Commit

Permalink
Default mode=skip for IngestCalibs; strip Nones from getDestination info
Browse files Browse the repository at this point in the history
  • Loading branch information
mrawls committed Mar 30, 2017
1 parent 1a19645 commit 5d89f90
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions python/lsst/pipe/tasks/ingestCalibs.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ def getDestination(self, butler, info, filename):
@param filename Input filename
@return Destination filename
"""
# 'tempinfo' was added as part of DM-5466 to strip Nones from info.
# The Butler should handle this behind-the-scenes in the future.
# Please reference DM-9873 and delete this comment once it is resolved.
tempinfo = {k:v for (k, v) in info.items() if v is not None}
calibType = self.getCalibType(filename)
raw = butler.get(calibType + "_filename", info)[0]
raw = butler.get(calibType + "_filename", tempinfo)[0]
# Ensure filename is devoid of cfitsio directions about HDUs
c = raw.find("[")
if c > 0:
Expand Down Expand Up @@ -178,7 +182,7 @@ def __init__(self, *args, **kwargs):
InputOnlyArgumentParser.__init__(self, *args, **kwargs)
self.add_argument("-n", "--dry-run", dest="dryrun", action="store_true",
default=False, help="Don't perform any action?")
self.add_argument("--mode", choices=["move", "copy", "link", "skip"], default="link",
self.add_argument("--mode", choices=["move", "copy", "link", "skip"], default="skip",
help="Mode of delivering the files to their destination")
self.add_argument("--create", action="store_true", help="Create new registry?")
self.add_argument("--validity", type=int, required=True, help="Calibration validity period (days)")
Expand Down

0 comments on commit 5d89f90

Please sign in to comment.