Closed rstoneback closed 3 years ago
Review of test logs in pysat v2.3 revealed:
ResourceWarning: Enable tracemalloc to get the object allocation traceback 1733/home/travis/build/pysat/pysat/pysat/instruments/methods/nasa_cdaweb.py:339: ResourceWarning: unclosed file <_io.BufferedWriter name='/tmp/tmpe4lbgacq/timed/saber/timed_l2av207_saber_201901010209_v01.cdf'> 1734 open(saved_local_fname, 'wb').write(req.content) 1735
I added a with statement to the open command to ensure the file is closed.
Review of test logs in pysat v2.3 revealed:
I added a with statement to the open command to ensure the file is closed.