diff options
-rwxr-xr-x | image_chromeos.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/image_chromeos.py b/image_chromeos.py index 3d9c1809..aa8824b6 100755 --- a/image_chromeos.py +++ b/image_chromeos.py @@ -280,11 +280,6 @@ def DoImage(argv): if log_level == 'average': cmd_executer.SetLogLevel(log_level) - if found == False: - temp_dir = os.path.dirname(located_image) - l.LogOutput('Deleting temp image dir: %s' % temp_dir) - shutil.rmtree(temp_dir) - logger.GetLogger().LogFatalIf(ret, 'Image command failed') # Unfortunately cros_image_to_target.py sometimes returns early when the @@ -316,6 +311,11 @@ def DoImage(argv): 'Image verification failed!') TryRemountPartitionAsRW(options.chromeos_root, options.remote, log_level) + + if found == False: + temp_dir = os.path.dirname(located_image) + l.LogOutput('Deleting temp image dir: %s' % temp_dir) + shutil.rmtree(temp_dir) else: l.LogOutput('Checksums match. Skipping reimage') return ret |