Sfoglia il codice sorgente

Merge branch 'master' of github.com:Supervisor/supervisor

Roger Hoover 13 anni fa
parent
commit
1ede908089
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      supervisor/datatypes.py

+ 2 - 2
supervisor/datatypes.py

@@ -417,9 +417,9 @@ class RestartUnconditionally:
 def auto_restart(value):
     value = str(value.lower())
     computed_value  = value
-    if value in ('true', '1', 'on', 'yes'):
+    if value in TRUTHY_STRINGS:
         computed_value = RestartUnconditionally
-    elif value in ('false', '0', 'off', 'no'):
+    elif value in FALSY_STRINGS:
         computed_value = False
     elif value == 'unexpected':
         computed_value = RestartWhenExitUnexpected