print hint if initial manifest is missing

Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
Nico Schottelius 2012-11-06 21:46:02 +01:00
commit aedb3669c7
3 changed files with 3 additions and 18 deletions

View file

@ -25,20 +25,6 @@ import os
import cdist
class NoInitialManifestError(cdist.Error):
"""
Display missing initial manifest
"""
def __init__(self, manifest_path):
if os.path.islink(manifest_path):
self.message = "%s -> %s" (manifest_path, os.path.realpath(manifest_path))
else:
self.message = manifest_path
def __str__(self):
return "Initial manifest missing: %s" % self.message
'''
common:
runs only locally, does not need remote
@ -100,8 +86,7 @@ class Manifest(object):
self.log.info("Running initial manifest " + self.local.manifest_path)
if not os.path.isfile(self.local.manifest_path):
print("fooooobar")
raise NoInitialManifestError(self.local.manifest_path)
raise cdist.Error("Initial manifest is missing")
self.local.run_script(script, env=env)