From 3f6c479d725cec0e54a2ca3497beb7e6dbfcee4d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 26 Sep 2011 11:07:45 +0200 Subject: [PATCH] move TYPE_PREFIX back into main, as it's only needed there and should work without module Signed-off-by: Nico Schottelius --- bin/cdist | 4 +++- lib/cdist/__init__.py | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/cdist b/bin/cdist index 15c3ff62..f4d67616 100755 --- a/bin/cdist +++ b/bin/cdist @@ -34,6 +34,8 @@ import tempfile log = logging.getLogger(__name__) +TYPE_PREFIX = "__" + class Cdist: """Cdist main class to hold arbitrary data""" @@ -482,7 +484,7 @@ if __name__ == "__main__": '../lib'))) import cdist - if re.match(cdist.TYPE_PREFIX, os.path.basename(sys.argv[0])): + if re.match(TYPE_PREFIX, os.path.basename(sys.argv[0])): emulator() else: import cdist.banner diff --git a/lib/cdist/__init__.py b/lib/cdist/__init__.py index 6bcc93d2..192e5001 100644 --- a/lib/cdist/__init__.py +++ b/lib/cdist/__init__.py @@ -19,7 +19,6 @@ # # -TYPE_PREFIX = "__" VERSION = "2.0.2" class Error(Exception):