bennoleslie/pexif — pull request #1 by aphexcx (2013-10-25 19:31:22+00:00)
Title: pexif.fromFile correctly releases file handle.

I implemented a fix for: http://stackoverflow.com/questions/19574328/how-to-unlock-file-locked-by-pexif

fromFile doesn't release the file handle because of a direct call to open() with no close(). This causes subsequent attempts to use the file, such as with os.rename(), to fail because the file is still locked. I've placed the JpegFile constructor within a with block to automatically close the file after returning the constructed JpegFile object.