skytools.DBScript: safer pidfile writing
authorMarko Kreen <markokr@gmail.com>
Wed, 14 Oct 2009 13:47:31 +0000 (16:47 +0300)
committerMarko Kreen <markokr@gmail.com>
Wed, 14 Oct 2009 13:47:31 +0000 (16:47 +0300)
commit9dcab958bdaadb2787027b9b10af362a0bc2f861
treee1360f38500014e4a30e41ff88e7116ebe98bca4
parent66c72793edd322c55dd02744abd8fab822e211b4
skytools.DBScript: safer pidfile writing

- signal_pidfile: Clarify ValueError error message. Thrown usually
  on empty pidfiles, the error messega will now mention the pidfile name.

- run_single_process: restructure pidfile writing, so that
  the pidfile is removed if .write() failed, but not when open() failed.
  This should avoid the chance that empty pidfiles are hanging around.
python/skytools/scripting.py