소스 검색

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

Roger Hoover 13 년 전
부모
커밋
1ede908089
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      supervisor/datatypes.py

+ 2 - 2
supervisor/datatypes.py

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