mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Remove debug prints
This commit is contained in:
parent
3d7f37176c
commit
02d6a0212f
1 changed files with 2 additions and 0 deletions
|
@ -113,8 +113,10 @@ class IPDiagnoser(Diagnoser):
|
||||||
# So let's try to ping the first 4~5 resolvers (shuffled)
|
# So let's try to ping the first 4~5 resolvers (shuffled)
|
||||||
# If we succesfully ping any of them, we conclude that we are indeed connected
|
# If we succesfully ping any of them, we conclude that we are indeed connected
|
||||||
def ping(protocol, target):
|
def ping(protocol, target):
|
||||||
|
print("ping -c1 -%s -W 3 %s >/dev/null 2>/dev/null" % (protocol, target))
|
||||||
return os.system("ping -c1 -%s -W 3 %s >/dev/null 2>/dev/null" % (protocol, target)) == 0
|
return os.system("ping -c1 -%s -W 3 %s >/dev/null 2>/dev/null" % (protocol, target)) == 0
|
||||||
|
|
||||||
|
|
||||||
random.shuffle(resolvers)
|
random.shuffle(resolvers)
|
||||||
return any(ping(protocol, resolver) for resolver in resolvers[:5])
|
return any(ping(protocol, resolver) for resolver in resolvers[:5])
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue