Commit
591c20651f1 "daemon.py: Don't shadow built-in 'file' variable"
changed most instances of "file" to "file_handle" but missed this one.
I'm not certain that this solves a real problem, but it still seems wrong.
Bug #7533.
# This is global to keep Python from garbage-collecting and
# therefore closing our file after this function exits. That would
# unlock the lock for us, and we don't want that.
- global file
+ global file_handle
file_handle = open(tmpfile, "w")
except IOError, e: