diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2012-08-29 16:58:29 +0100 |
---|---|---|
committer | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-08-30 11:31:41 +0000 |
commit | cf6235a2028360590eb18d3a0cb1672a77d8573f (patch) | |
tree | 7175c2f8f65107d8d297078173d3914f23ba4f11 /morphlib/morphologyfactory.py | |
parent | c4facff97b27968f00a75ffb3d49cea2080ad9a4 (diff) | |
download | morph-cf6235a2028360590eb18d3a0cb1672a77d8573f.tar.gz |
Display expected filename in "Failed to determine build system" error
This allows a few more diagnostics of what went wrong when the error
is inside the baserock:morphs repository.
Diffstat (limited to 'morphlib/morphologyfactory.py')
-rw-r--r-- | morphlib/morphologyfactory.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/morphlib/morphologyfactory.py b/morphlib/morphologyfactory.py index a4e7b4e8..69b47507 100644 --- a/morphlib/morphologyfactory.py +++ b/morphlib/morphologyfactory.py @@ -22,10 +22,10 @@ class MorphologyFactoryError(cliapp.AppException): class AutodetectError(MorphologyFactoryError): - def __init__(self, repo_name, ref): + def __init__(self, repo_name, ref, filename): MorphologyFactoryError.__init__( self, "Failed to determine the build system of repo %s at " - "ref %s" % (repo_name, ref)) + "ref %s: was looking for %s" % (repo_name, ref, filename)) class NotcachedError(MorphologyFactoryError): @@ -61,7 +61,7 @@ class MorphologyFactory(object): if text is None: bs = morphlib.buildsystem.detect_build_system(file_list) if bs is None: - raise AutodetectError(reponame, sha1) + raise AutodetectError(reponame, sha1, filename) # TODO consider changing how morphs are located to be by morph # name rather than filename, it would save creating a # filename only to strip it back to its morph name again |