diff options
author | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2014-10-16 17:25:37 +0000 |
---|---|---|
committer | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2014-11-28 18:26:15 +0000 |
commit | db43e38a7f24b770d68fd6ebbe78becb3346fbee (patch) | |
tree | b28c10f1f1745cb0cb32ccaddb95efb307fd42e4 | |
parent | 995d66281f8e116cc9253df9463f632cca579af7 (diff) | |
download | morph-db43e38a7f24b770d68fd6ebbe78becb3346fbee.tar.gz |
Don't loop mount when mounting a device
-rw-r--r-- | morphlib/writeexts.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/morphlib/writeexts.py b/morphlib/writeexts.py index 4b9e4fcd..31e7a0b6 100644 --- a/morphlib/writeexts.py +++ b/morphlib/writeexts.py @@ -246,7 +246,10 @@ class WriteExtension(cliapp.Application): self.status(msg='Mounting filesystem') tempdir = tempfile.mkdtemp() - cliapp.runcmd(['mount', '-o', 'loop', location, tempdir]) + if self.is_device(location): + cliapp.runcmd(['mount', location, tempdir]) + else: + cliapp.runcmd(['mount', '-o', 'loop', location, tempdir]) return tempdir def unmount(self, mount_point): |