forked from ungleich-public/cdist
use constant instead of string for .cdist
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
parent
4de5f6f58e
commit
41ab7390db
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue