use args as well.

This commit is contained in:
benoitc 2012-10-25 10:14:05 +02:00
parent e12f520cea
commit d218ba54c6

View File

@ -77,10 +77,10 @@ class Pidfile(object):
os.kill(wpid, 0)
return wpid
except OSError as e:
if e[0] == errno.ESRCH:
if e.args[0] == errno.ESRCH:
return
raise
except IOError as e:
if e[0] == errno.ENOENT:
if e.args[0] == errno.ENOENT:
return
raise