summaryrefslogtreecommitdiff
path: root/morphlib
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-04-26 11:47:52 +0100
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-04-26 11:47:52 +0100
commit01eaed7aaec7e60d40bf07e3850547e548ce206e (patch)
tree35146c83c2d0edce3e9f87a6923c373bb8fbc34b /morphlib
parent7e4bdc7011564c64d1140eacbab58b875560dfa1 (diff)
downloadmorph-01eaed7aaec7e60d40bf07e3850547e548ce206e.tar.gz
Fix unmounting /proc in staging so it works when /proc wasn't mounted
Diffstat (limited to 'morphlib')
-rw-r--r--morphlib/builder2.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/morphlib/builder2.py b/morphlib/builder2.py
index cb1cb0d8..774df675 100644
--- a/morphlib/builder2.py
+++ b/morphlib/builder2.py
@@ -160,8 +160,8 @@ class ChunkBuilder(BuilderBase):
return None
def umount_proc(self, mounted): # pragma: no cover
- path = os.path.join(mounted, 'self')
- if mounted and self.setup_proc and os.path.exists(path):
+ if (mounted and self.setup_proc and mounted and
+ os.path.exists(os.path.join(mounted, 'self'))):
logging.error('Unmounting /proc in staging area: %s' % mounted)
ex = morphlib.execute.Execute('.', logging.debug)
ex.runv(['umount', mounted])