pcdshub / happi

Heuristic Access to Positions of Photon Instruments
https://pcdshub.github.io/happi/master
Other
13 stars 29 forks source link

Clean up temporary file from #303 #304

Closed ZLLentz closed 1 year ago

ZLLentz commented 1 year ago

Expected Behavior

The temporary file should be cleaned up if it can be.

Current Behavior

The file is never cleaned up.

303 was written assuming that the file could be useful, but I'm so sure any more.

Possible Solution

Try/except clean up the file. This doesn't need to be particularly robust, it just need to be a best-effort cleanup. Leaving the file around is not fatal. As a bonus, the filename of the temp file can be simplified to just a hash.