From 272b8722c1cdda9fa7f1ef349abe9cdc9366945d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 27 Sep 2011 16:10:53 +0200 Subject: [PATCH] fix output, compare string with string not string with list Signed-off-by: Nico Schottelius --- lib/cdist/emulator.py | 6 +++--- test.py | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/cdist/emulator.py b/lib/cdist/emulator.py index 68a67176..6a99ba79 100644 --- a/lib/cdist/emulator.py +++ b/lib/cdist/emulator.py @@ -110,12 +110,12 @@ def run(argv): value_old = param_fd.readlines() param_fd.close() - if(value_old != value): - raise cdist.Error("Parameter + \"" + param + + if(value_old[0] != value): + raise cdist.Error("Parameter\"" + param + "\" differs: " + " ".join(value_old) + " vs. " + value + "\nSource = " + " ".join(old_object_source) - + " new =" + object_source) + + " new = " + object_source) else: param_fd = open(file, "w") param_fd.writelines(value) diff --git a/test.py b/test.py index ce433152..b6a575e9 100755 --- a/test.py +++ b/test.py @@ -139,7 +139,9 @@ class Config(unittest.TestCase): manifest_fd.close() try: + print("a") self.config.run_initial_manifest() + print("b") except cdist.Error: failed = True else: