diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-04-26 11:47:52 +0100 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-04-26 11:47:52 +0100 |
commit | 01eaed7aaec7e60d40bf07e3850547e548ce206e (patch) | |
tree | 35146c83c2d0edce3e9f87a6923c373bb8fbc34b /morphlib | |
parent | 7e4bdc7011564c64d1140eacbab58b875560dfa1 (diff) | |
download | morph-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.py | 4 |
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]) |