raise cdist error instead of oserror

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
remotes/origin/feature_files_export
Nico Schottelius 13 years ago
parent 3c31b4f9a3
commit 3883fe4247
  1. 6
      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__())

Loading…
Cancel
Save