From dadc3ffe941dd115bc4a77ec68e07279041cce5f Mon Sep 17 00:00:00 2001
From: Nico Schottelius <nico@kr.ethz.ch>
Date: Fri, 16 Sep 2011 15:01:33 +0200
Subject: [PATCH] self....

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
---
 bin/cdist | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/cdist b/bin/cdist
index 40b8dd5e..05eb8c00 100755
--- a/bin/cdist
+++ b/bin/cdist
@@ -514,7 +514,7 @@ class Cdist:
       env["__object"]      = self.object_dir(cdist_object)
       env["__object_id"]   = self.get_object_id_from_object(cdist_object)
       env["__object_fq"]   = cdist_object
-      env["__type"]        = self.type_dir(get_type_from_object(cdist_object))
+      env["__type"]        = self.type_dir(self.get_type_from_object(cdist_object))
 
       if mode == "gencode":
          paths = self.type_gencode_paths(self.get_type_from_object(cdist_object))
@@ -644,7 +644,7 @@ def install(args):
 
 def emulator():
    """Emulate type commands (i.e. __file and co)"""
-   process = {}
+   type = os.path.basename(sys.argv[0])
 
 def commandline():
    """Parse command line"""