浏览代码

Remove duplicate truthy/falsy tuples

Mike Naberezny 13 年之前
父节点
当前提交
0b05ee3db0
共有 1 个文件被更改,包括 2 次插入2 次删除
  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