From 6f3bba76d6cfbde64d0c7cc9f52effee8e8dd319 Mon Sep 17 00:00:00 2001 From: harlowja Date: Mon, 9 Jul 2012 22:52:06 -0700 Subject: Use the common 'is_false' routine for testing false here instead of a custom list that may confuse people trying to use this. --- cloudinit/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudinit/util.py b/cloudinit/util.py index e591e306..6501cbdf 100644 --- a/cloudinit/util.py +++ b/cloudinit/util.py @@ -828,7 +828,7 @@ def close_stdin(): if _CLOUD_INIT_SAVE_STDIN is set in environment to a non empty or '0' value then input will not be closed (only useful potentially for debugging). """ - if os.environ.get("_CLOUD_INIT_SAVE_STDIN") in ("", "0", 'False'): + if is_false(os.environ.get("_CLOUD_INIT_SAVE_STDIN")): return with open(os.devnull) as fp: os.dup2(fp.fileno(), sys.stdin.fileno()) -- cgit v1.2.3