diff --git a/cdist/exec/local.py b/cdist/exec/local.py index a5e838cb..785d5ff2 100644 --- a/cdist/exec/local.py +++ b/cdist/exec/local.py @@ -165,15 +165,20 @@ class Local(object): for sub_dir in [ "explorer", "manifest", "type" ]: current_dir = os.path.join(conf_dir, sub_dir) + # Allow conf dirs to contain only partial content + if not os.path.exists(current_dir): + continue + for entry in os.listdir(current_dir): rel_entry_path = os.path.join(sub_dir, entry) src = os.path.join(conf_dir, sub_dir, entry) - dst = os.path.join(self.conf_path, entry) + dst = os.path.join(self.conf_path, sub_dir, entry) # Already exists? remove and link if os.path.exists(dst): os.unlink(dst) - + + self.log.debug("Linking %s to %s ..." % (src, dst)) try: os.symlink(src, dst) except OSError as e: diff --git a/docs/changelog b/docs/changelog index 242e0c2f..4b77af7a 100644 --- a/docs/changelog +++ b/docs/changelog @@ -7,6 +7,7 @@ Changelog 2.1.0pre4: * Dist: PyPi: Move cdist.py to script/cdist to avoid double import + * Added internal support for multiple configuration directories 2.1.0pre3: 2012-10-30 * Dist: PyPi: Types and explorer included as package data