mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[mod] more pythonic code
This commit is contained in:
parent
9a4dbd5d31
commit
ac9f61c7b1
1 changed files with 15 additions and 10 deletions
|
@ -639,17 +639,22 @@ def _domain_is_accessible_through_HTTP(ip, domain):
|
|||
|
||||
|
||||
def _summary_code_to_string(code):
|
||||
if (code <= -30):
|
||||
if code <= -30:
|
||||
return "CRITICAL"
|
||||
elif (code <= -20):
|
||||
return "WARNING"
|
||||
elif (code <= -10):
|
||||
return "Attention"
|
||||
elif (code <= 0):
|
||||
return "Unknown?"
|
||||
elif (code <= 10):
|
||||
return "Good"
|
||||
elif (code <= 20):
|
||||
|
||||
if code <= -20:
|
||||
return "WARNING"
|
||||
|
||||
if code <= -10:
|
||||
return "Attention"
|
||||
|
||||
if code <= 0:
|
||||
return "Unknown?"
|
||||
|
||||
if code <= 10:
|
||||
return "Good"
|
||||
|
||||
if code <= 20:
|
||||
return "Great!"
|
||||
|
||||
return "Unknown?"
|
||||
|
|
Loading…
Add table
Reference in a new issue