summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2012-07-10 14:29:24 -0400
committerScott Moser <smoser@ubuntu.com>2012-07-10 14:29:24 -0400
commitfa644f5edf9732ad3e4ca03531d78314518d76f7 (patch)
tree10d876057e13b21cb9b50bc48fff9ca89ca25ea2 /cloudinit
parente43d91ba92a078c574dbf966fbeaf6a4b3d50d7d (diff)
parent6f3bba76d6cfbde64d0c7cc9f52effee8e8dd319 (diff)
downloadvyos-cloud-init-fa644f5edf9732ad3e4ca03531d78314518d76f7.tar.gz
vyos-cloud-init-fa644f5edf9732ad3e4ca03531d78314518d76f7.zip
util.close_stdin(): Use the common 'is_false' routine for testing false
instead of a custom list that may confuse people trying to use this, use the is_false function.
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/util.py2
1 files changed, 1 insertions, 1 deletions
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())