diff --git a/lib/cdist/exec/local.py b/lib/cdist/exec/local.py index 6157c0bc..264279a2 100644 --- a/lib/cdist/exec/local.py +++ b/lib/cdist/exec/local.py @@ -136,5 +136,7 @@ class Local(object): dst = os.path.join(self.bin_path, cdist_type.name) self.log.debug("Linking emulator: %s to %s", src, dst) - # FIXME: handle exceptions - os.symlink(src, dst) + try: + os.symlink(src, dst) + except OSError as e: + raise cdist.Error("Linking emulator from " + src + " to " + dst + " failed: " + e.__str__())