|
|
@ -152,8 +152,8 @@ def only_admins(fn): |
|
|
return wrapped |
|
|
return wrapped |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def ping(hostname): |
|
|
|
|
|
response = os.system("`which ping` -c 1 %s > /dev/null" % hostname) |
|
|
|
|
|
|
|
|
def ping(hostname, count=1): |
|
|
|
|
|
response = os.system("`which ping` -4Anq -c%d -W1 %s > /dev/null" % (count, hostname)) |
|
|
return True if response == 0 else False |
|
|
return True if response == 0 else False |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|