From 9d582ae24f1fa4c3697bb0ddfd83a146fcb75432 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 27 Sep 2011 14:01:09 +0200 Subject: [PATCH] rename emulator to run Signed-off-by: Nico Schottelius --- bin/cdist | 2 +- lib/cdist/emulator.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/cdist b/bin/cdist index d21fda40..245b2fc0 100755 --- a/bin/cdist +++ b/bin/cdist @@ -101,7 +101,7 @@ if __name__ == "__main__": if re.match(TYPE_PREFIX, os.path.basename(sys.argv[0])): import cdist.emulator - cdist.emulator.emulator(sys.argv) + cdist.emulator.run(sys.argv) else: import cdist import cdist.banner diff --git a/lib/cdist/emulator.py b/lib/cdist/emulator.py index b96b62dd..33594e45 100644 --- a/lib/cdist/emulator.py +++ b/lib/cdist/emulator.py @@ -29,7 +29,7 @@ import cdist.path log = logging.getLogger(__name__) -def emulator(argv): +def run(argv): """Emulate type commands (i.e. __file and co)""" type = os.path.basename(argv[0]) type_dir = os.path.join(os.environ['__cdist_type_base_dir'], type) @@ -101,8 +101,8 @@ def emulator(argv): # Already exists, verify all parameter are the same if object_exists: if not os.path.isfile(file): - print("New parameter + " + param + "specified, aborting") - print("Source = " + old_object_source + "new =" + object_source) + print("New parameter + \"" + param + "\" specified, aborting") + print("Source = " + " ".join(old_object_source) + " new =" + object_source) sys.exit(1) else: param_fd = open(file, "r")