On 02Jan2012 20:31, Devin Jeanpierre <jeanpierr...@gmail.com> wrote:
| > I think that catching the exception is probably the most Pythonic way.
| 
| It's the only correct way.

Indeed, but be precise - chek that it _is_ error 3, or more portably,
errno.ESRCH. POSIX probably mandates that that is a 3, but the symbol
should track the local system if it differs. Example:

  import errno
  ...
  try:
    ...signal...
  except OSError, e:
    if e.errno == errno.ESRCH:
      pass      # or maybe an info log message
    else:
      raise     # something else wrong - raise exception anyway

Cheers,
-- 
Cameron Simpson <c...@zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

WHAT"S A ""K3WL D00D"" AND WH3R3 CAN 1 G3T S0M3!!!!!!!!!!!????????
        - Darren Embry
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to