summaryrefslogtreecommitdiff
path: root/morphlib/builder2.py
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2013-06-06 09:55:11 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2013-06-06 09:55:11 +0000
commita1e2ee625ad5d865f7d63a86f8821e1bd18d2096 (patch)
tree519d256319fbfe5bb0d27646036202d81d1082c2 /morphlib/builder2.py
parent710af7e4bc5e3654221ce23d5b3ccbafbd0eae0c (diff)
downloadmorph-a1e2ee625ad5d865f7d63a86f8821e1bd18d2096.tar.gz
builder: replace shelling out to mv with os.rename
It's just 1 system call instead of at least 3.
Diffstat (limited to 'morphlib/builder2.py')
-rw-r--r--morphlib/builder2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/morphlib/builder2.py b/morphlib/builder2.py
index 459094f4..bb791cb4 100644
--- a/morphlib/builder2.py
+++ b/morphlib/builder2.py
@@ -317,7 +317,7 @@ class ChunkBuilder(BuilderBase):
src_dir = self.staging_area.dirname
dest_dir = os.path.join(self.app.settings['tempdir'],
'failed')
- cliapp.runcmd(['mv', src_dir, dest_dir])
+ os.rename(src_dir, dest_dir)
raise
self.staging_area.chroot_close()
built_artifacts = self.assemble_chunk_artifacts(destdir)