Skip to content

Commit

Permalink
Enum comparison should use == not is
Browse files Browse the repository at this point in the history
The ccd.getType() is cameraGeom.SCIENCE condition no longer evaluates
to True where appropriate.  The condition here should be ==, not is.
It is likely the behavior changed along with the pybind11 wrapping.
  • Loading branch information
laurenam committed Nov 7, 2017
1 parent 2a40766 commit 9e429dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/showVisitSkyMap.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def main(rootDir, tract, visits, ccds=None, ccdKey='ccd', showPatch=False, saveF
bbox = ccd.getBBox()
ccdId = int(ccd.getSerial())

if (ccds is None or ccdId in ccds) and ccd.getType() is cameraGeom.SCIENCE:
if (ccds is None or ccdId in ccds) and ccd.getType() == cameraGeom.SCIENCE:
dataId = {'visit': visit, ccdKey: ccdId}
try:
md = butler.get("calexp_md", dataId)
Expand Down

0 comments on commit 9e429dc

Please sign in to comment.