From 1b0d85dcbe0ceac565c17109c4f9fa2f813f72a4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 16 Sep 2011 15:29:56 +0200 Subject: [PATCH] link type emulator to ourself Signed-off-by: Nico Schottelius --- bin/cdist | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/bin/cdist b/bin/cdist index 39452352..e28a14c4 100755 --- a/bin/cdist +++ b/bin/cdist @@ -367,7 +367,7 @@ class Cdist: def link_type_to_emulator(self): """Link type names to cdist-type-emulator""" for type in self.list_types(): - source = os.path.join(self.lib_dir, "cdist-type-emulator") + source = sys.argv[0] destination = os.path.join(self.bin_dir, type) log.debug("Linking %s to %s", source, destination) os.symlink(source, destination) @@ -637,6 +637,18 @@ def emulator(): """Emulate type commands (i.e. __file and co)""" type = os.path.basename(sys.argv[0]) + + parser = argparse.ArgumentParser(add_help=False) + + print("Oh, noe") + sys.exit(1) + + # Setup optional parameters + # Setup required parameters + # Setup positional parameter, if not singleton + + + def commandline(): """Parse command line""" # Construct parser others can reuse