puppetlabs/puppet — pull request #823 by zaphod42 (2012-05-30 15:50:04+00:00)
Title: Maint/3.0rc/leaked filehandles in upstart

Not closing the filehandle after reading leaves a File object floating
around with an open handle. On unix systems this is ok, but on Windows
this causes a problem for the subsequent move of the new file into
place. However, this does point out that we were not properly closing the filehandles.

This changes to reading of a file to ensure that the file handle is
closed after we finish reading.