mirror of https://github.com/Mikaela/Limnoria.git
Unix: fixed uncaught OSError exception raised when executing ping fails.
Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
This commit is contained in:
parent
f69c47b092
commit
61167ce909
|
@ -270,10 +270,14 @@ class Unix(callbacks.Plugin):
|
||||||
try: host = host.group(0)
|
try: host = host.group(0)
|
||||||
except AttributeError: pass
|
except AttributeError: pass
|
||||||
|
|
||||||
inst = subprocess.Popen([pingCmd,'-c','1', host],
|
try:
|
||||||
stdout=subprocess.PIPE,
|
inst = subprocess.Popen([pingCmd,'-c','1', host],
|
||||||
stderr=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stdin=file(os.devnull))
|
stderr=subprocess.PIPE,
|
||||||
|
stdin=file(os.devnull))
|
||||||
|
except OSError, e:
|
||||||
|
irc.error('It seems the configured ping command was '
|
||||||
|
'not available (%s).' % e, Raise=True)
|
||||||
|
|
||||||
result = inst.communicate()
|
result = inst.communicate()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue