diff options
Diffstat (limited to 'scripts/lib/wic')
-rw-r--r-- | scripts/lib/wic/plugins/imager/direct.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py index ad9082b2d3..aa9cc9f4e3 100644 --- a/scripts/lib/wic/plugins/imager/direct.py +++ b/scripts/lib/wic/plugins/imager/direct.py | |||
@@ -172,10 +172,11 @@ class DirectPlugin(ImagerPlugin): | |||
172 | if rsize_bb: | 172 | if rsize_bb: |
173 | part.size = int(round(float(rsize_bb))) | 173 | part.size = int(round(float(rsize_bb))) |
174 | 174 | ||
175 | self._image.prepare(self) | 175 | try: |
176 | 176 | self._image.prepare(self) | |
177 | if fstab_path: | 177 | finally: |
178 | shutil.move(fstab_path + ".orig", fstab_path) | 178 | if fstab_path: |
179 | shutil.move(fstab_path + ".orig", fstab_path) | ||
179 | 180 | ||
180 | self._image.layout_partitions() | 181 | self._image.layout_partitions() |
181 | self._image.create() | 182 | self._image.create() |