summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-12-08 10:11:32 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-12-08 10:11:32 +0000
commitcb880f3554d9cf8daa3839dcd7a7ed2c336df85b (patch)
tree123de3f67adfeeba414e9d07b76d0be65e986558
parentfc5d4e58753d113d898744c1924b13ddc34e526e (diff)
parent203623a34055c41aed529d50c24fb4a99714ccb7 (diff)
downloadmorph-cb880f3554d9cf8daa3839dcd7a7ed2c336df85b.tar.gz
Merge branch 'sam/fix-help-extensions'
Reviewed-By: Pedro Alvarez <pedro.alvarez@codethink.co.uk> Reviewed-By: Emmet Hikory <emmet.hikory@codethink.co.uk>
-rw-r--r--morphlib/app.py2
-rw-r--r--morphlib/extensions.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/morphlib/app.py b/morphlib/app.py
index 3f4171a4..930e023d 100644
--- a/morphlib/app.py
+++ b/morphlib/app.py
@@ -432,7 +432,7 @@ class Morph(cliapp.Application):
self._help(True)
def help_extensions(self, args):
- exts = extensions.list_extensions(self.settings['build-ref-prefix'])
+ exts = extensions.list_extensions()
template = "Extensions:\n %s\n"
ext_string = '\n '.join(exts)
self.output.write(template % (ext_string))
diff --git a/morphlib/extensions.py b/morphlib/extensions.py
index b270d304..051a54a7 100644
--- a/morphlib/extensions.py
+++ b/morphlib/extensions.py
@@ -38,6 +38,7 @@ class ExtensionNotExecutableError(ExtensionError):
pass
def _get_root_repo():
+ workspace = morphlib.workspace.open('.')
system_branch = morphlib.sysbranchdir.open_from_within('.')
root_repo_dir = morphlib.gitdir.GitDirectory(
system_branch.get_git_directory_name(
@@ -77,7 +78,8 @@ def _list_extensions(kind):
try:
repo_extension_filenames = \
_list_repo_extension_filenames(kind)
- except (sysbranchdir.NotInSystemBranch):
+ except (morphlib.workspace.NotInWorkspace,
+ sysbranchdir.NotInSystemBranch):
# Squash this and just return no system branch extensions
pass
morph_extension_filenames = _list_morph_extension_filenames(kind)