diff --git a/tests/unittests/test_ds_identify.py b/tests/unittests/test_ds_identify.py index 1be00e46425..105825b698e 100644 --- a/tests/unittests/test_ds_identify.py +++ b/tests/unittests/test_ds_identify.py @@ -622,7 +622,7 @@ def test_single_entry_defines_datasource(self): mydata = copy.deepcopy(VALID_CFG["Ec2-hvm"]) cfgpath = "etc/cloud/cloud.cfg.d/myds.cfg" mydata["files"][cfgpath] = 'datasource_list: ["NoCloud"]\n' - self._check_via_dict(mydata, rc=RC_FOUND, dslist=["NoCloud", DS_NONE]) + self._check_via_dict(mydata, rc=RC_FOUND, dslist=["NoCloud"]) def test_configured_list_with_none(self): """When datasource_list already contains None, None is not added. diff --git a/tools/ds-identify b/tools/ds-identify index 741742c7f72..8f8e56198b2 100755 --- a/tools/ds-identify +++ b/tools/ds-identify @@ -1999,7 +1999,11 @@ _main() { # if there is only a single entry in $DI_DSLIST if [ $# -eq 1 ] || [ $# -eq 2 -a "$2" = "None" ] ; then debug 1 "single entry in datasource_list ($DI_DSLIST) use that." - found "$@" + if [ $# -eq 1 ]; then + write_result "datasource_list: [ $1 ]" + else + found "$@" + fi return fi