From 41ab7390dbb223415d15387507a9aaaccb585483 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 6 Oct 2011 13:02:08 +0200 Subject: [PATCH] use constant instead of string for .cdist Signed-off-by: Steven Armstrong --- lib/cdist/core/object.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/cdist/core/object.py b/lib/cdist/core/object.py index c136390e..80c2c351 100644 --- a/lib/cdist/core/object.py +++ b/lib/cdist/core/object.py @@ -22,6 +22,7 @@ import os import cdist +import cdist.path class Object(object): @@ -72,7 +73,7 @@ class Object(object): """Return a list of object names""" for path, dirs, files in os.walk(cls.base_dir()): # FIXME: use constant instead of string - if '.cdist' in dirs: + if cdist.path.DOT_CDIST in dirs: yield os.path.relpath(path, cls.base_dir()) def __init__(self, type, object_id=None, parameter=None, requirements=None): @@ -90,7 +91,7 @@ class Object(object): return os.path.join( self.base_dir(), self.qualified_name, - '.cdist' + cdist.path.DOT_CDIST ) @property