From e07de49c95955b194f12a997db10689f4c421106 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Wed, 26 Jan 2011 17:09:52 -0500 Subject: if output entry is a scalar, send stdout and stderr same place --- cloudinit/CloudConfig/__init__.py | 4 ++-- doc/examples/cloud-config.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cloudinit/CloudConfig/__init__.py b/cloudinit/CloudConfig/__init__.py index fe2dddcf..7b01f00a 100644 --- a/cloudinit/CloudConfig/__init__.py +++ b/cloudinit/CloudConfig/__init__.py @@ -136,9 +136,9 @@ def get_output_cfg(cfg, mode="init"): # then it applies to all users of this (init, config, final) modecfg = outcfg['all'] - # if value is a string, it specifies stdout + # if value is a string, it specifies stdout and stderr if isinstance(modecfg,str): - ret = [ modecfg, None ] + ret = [ modecfg, modecfg ] # if its a list, then we expect (stdout, stderr) if isinstance(modecfg,list): diff --git a/doc/examples/cloud-config.txt b/doc/examples/cloud-config.txt index e2bf128e..5000d6d7 100644 --- a/doc/examples/cloud-config.txt +++ b/doc/examples/cloud-config.txt @@ -298,7 +298,7 @@ final_message: "The system is finally up, after $UPTIME seconds" # entries. Each one defines where # cloud-init, cloud-config, cloud-config-final or all output will go # each entry in the dict can be a string, list or dict. -# if it is a string, it refers to stdout +# if it is a string, it refers to stdout and stderr # if it is a list, entry 0 is stdout, entry 1 is stderr # if it is a dict, it is expected to have 'output' and 'error' fields # default is to write to console only -- cgit v1.2.3