diff options
author | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2014-11-09 22:20:15 +0000 |
---|---|---|
committer | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2014-11-09 22:20:15 +0000 |
commit | 4520ed5028ffadac72a9d3fa3d9d61dba20180e0 (patch) | |
tree | d1ca806e9cadc487d7a539a20fa7d56710a8b6c6 | |
parent | 33a5e81ca8e52d3cf28e471e790ddb982590f5b9 (diff) | |
download | morph-baserock/pedroalvarez/rawdisk-to-device3.tar.gz |
Don't create rawdisk image if deploying to a devicebaserock/pedroalvarez/rawdisk-to-device3
-rwxr-xr-x | morphlib/exts/rawdisk.write | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/morphlib/exts/rawdisk.write b/morphlib/exts/rawdisk.write index 7d0ebaee..64a749d3 100755 --- a/morphlib/exts/rawdisk.write +++ b/morphlib/exts/rawdisk.write @@ -43,11 +43,12 @@ class RawDiskWriteExtension(morphlib.writeexts.WriteExtension): raise cliapp.AppException('Wrong number of command line args') temp_root, location = args - if os.path.isfile(location): + if os.path.isfile(location) and not self.is_device(location): self.upgrade_local_system(location, temp_root) else: try: - self.create_raw_disk_image(location) + if not self.is_device(location): + self.create_raw_disk_image(location) self.create_local_system(temp_root, location) self.status(msg='Disk image has been created at %s' % location) except Exception: |