summaryrefslogtreecommitdiff
path: root/morphlib/plugins
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-02-07 11:12:25 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-02-07 11:12:25 +0000
commit55c1922f52cff88ec1c08f350cab88e8a2957322 (patch)
tree696ba40915140f3debe94e7ad700dc6bc3fd561c /morphlib/plugins
parentcc7ac2b0820222053e15c953e8e02c7bbff1ad4d (diff)
downloadmorph-55c1922f52cff88ec1c08f350cab88e8a2957322.tar.gz
Comment logic in _run_extension
Suggested-By: Sam Thursfield
Diffstat (limited to 'morphlib/plugins')
-rw-r--r--morphlib/plugins/deploy_plugin.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/morphlib/plugins/deploy_plugin.py b/morphlib/plugins/deploy_plugin.py
index fbc8f145..79715e13 100644
--- a/morphlib/plugins/deploy_plugin.py
+++ b/morphlib/plugins/deploy_plugin.py
@@ -174,8 +174,10 @@ class DeployPlugin(cliapp.Plugin):
'''
+ # Look for extension in the system morphology's repository.
ext = self._cat_file(repo_dir, ref, name + kind)
if ext is None:
+ # Not found: look for it in the Morph code.
code_dir = os.path.dirname(morphlib.__file__)
ext_filename = os.path.join(code_dir, 'exts', name + kind)
if not os.path.exists(ext_filename):
@@ -183,6 +185,7 @@ class DeployPlugin(cliapp.Plugin):
'Could not find extension %s%s' % (name, kind))
delete_ext = False
else:
+ # Found it in the system morphology's repository.
fd, ext_filename = tempfile.mkstemp()
os.write(fd, ext)
os.close(fd)