Change the job.postprocess_job_state to catch OSError and not IOError, since
OSError is what os.remove throws when the file does not exist.

It also cleans up some more of the backing file locking for job_state, so
that the read and write code in server_job is compliant as well. The main

difference is that while read_from_file does not provide generally safe
locking and synching behaviour, it does do so for its final synchronization.
This makes it easier for non-job_state code to be safe, since it only needs
to lock the file it passes in.

It also moves the locking decorator out of the class, to make it easier to
use on the fly. It also separates out the with-lock and with-sync code.

Signed-off-by: John Admanski <jadmanski@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4173 592f7852-d20e-0410-864c-8624ca9c26a4
3 files changed