summaryrefslogtreecommitdiff
path: root/morphlib/plugins
diff options
context:
space:
mode:
authorDaniel Silverstone <daniel.silverstone@codethink.co.uk>2012-10-09 12:37:28 +0000
committerDaniel Silverstone <daniel.silverstone@codethink.co.uk>2012-10-09 12:37:28 +0000
commitc6e26f7ba55daf53f8bbf9ef041927f35f142333 (patch)
treed7500a0980079af17cbbc3e2f12d6de458baf264 /morphlib/plugins
parent8a881c54041fd03012aed6907b8458956e16e608 (diff)
downloadmorph-c6e26f7ba55daf53f8bbf9ef041927f35f142333.tar.gz
foldme
Diffstat (limited to 'morphlib/plugins')
-rw-r--r--morphlib/plugins/trebuchet_plugin.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/morphlib/plugins/trebuchet_plugin.py b/morphlib/plugins/trebuchet_plugin.py
index 6976c297..1c44bf29 100644
--- a/morphlib/plugins/trebuchet_plugin.py
+++ b/morphlib/plugins/trebuchet_plugin.py
@@ -22,7 +22,12 @@ import gzip
import morphlib
class MountableImage(object):
- '''Mountable image (deals with decompression).'''
+ '''Mountable image (deals with decompression).
+
+ Note, this is a read-only mount in the sense that the decompressed
+ image is not then recompressed after, instead any changes are discarded.
+
+ '''
def __init__(self, app, artifact_path):
self.app = app
self.artifact_path = artifact_path
@@ -32,7 +37,7 @@ class MountableImage(object):
self.app.status(msg=' Decompressing...', chatty=True)
(tempfd, self.temp_path) = \
tempfile.mkstemp(dir=self.app.settings['tempdir'])
- outfh = None
+
try:
with os.fdopen(tempfd, "wb") as outfh:
with gzip.open(path, "rb") as infh: