diff --git a/bin/cdist b/bin/cdist
index 0705f5bd..6a7a2d6d 100755
--- a/bin/cdist
+++ b/bin/cdist
@@ -195,19 +195,17 @@ if __name__ == "__main__":
         import re
         import sys
 
+        import cdist
+
         log = logging.getLogger("cdist")
 
         # Ensure our /lib/ is included into PYTHON_PATH
         sys.path.insert(0, os.path.abspath(
                 os.path.join(os.path.dirname(os.path.realpath(__file__)), '../lib')))
 
-        import cdist
-
-        TYPE_PREFIX = "__"
-
         logging.basicConfig(format='%(levelname)s: %(message)s')
 
-        if re.match(TYPE_PREFIX, os.path.basename(sys.argv[0])):
+        if re.match("__", os.path.basename(sys.argv[0])):
             emulator()
         else:
             commandline()