LSSTDESC/Coord

ResourceWarning in LSST stack

Closed this issue · 0 comments

When running seemingly unrelated code with the latest weekly (w_2018_37) of the LSST DM stack, I get the following warning:

/ssd/lsstsw/stack3_20171021/stack/miniconda3-4.3.21-10a4fa6/Linux64/coord/1.0.5.lsst/lib/python/LSSTDESC.Coord-1.0.5-py3.6-linux-x86_64.egg/coord/__init__.py:47: 
ResourceWarning: unclosed file <_io.TextIOWrapper name='/ssd/lsstsw/stack3_20171021/stack/miniconda3-4.3.21-10a4fa6/Linux64/coord/1.0.5.lsst/lib/python/LSSTDESC.Coord-1.0.5-py3.6-linux-x86_64.egg/coord/
include/Angle_C.h' mode='r' encoding='ANSI_X3.4-1968'>
    _ffi.cdef(open(file_name).read())

A suggestion was made that maybe a with guard needs to be around that line in __init__.py?