=== modified file 'linaro-fetch-image-ui'
@@ -1240,10 +1240,13 @@
elif event[0] == "end":
self.event_end(event[1])
- elif event == "terminate" or event[0] == "abort":
+ elif event == "terminate" or event == "abort":
# Process complete. Enable next button.
self.wizard.FindWindowById(wx.ID_FORWARD).Enable()
- self.populate_file_system_status.SetLabel("Done")
+ if event == "terminate":
+ self.populate_file_system_status.SetLabel("Done")
+ else:
+ self.populate_file_system_status.SetLabel("Failed")
return # Even if queue isn't empty, stop processing it
elif event[0] == "update":
=== modified file 'linaro_image_tools/fetch_image.py'
@@ -580,6 +580,7 @@
self.append_setting_to(args, settings, 'mmc')
self.append_setting_to(args, settings, 'image_file')
+ self.append_setting_to(args, settings, 'image_size')
self.append_setting_to(args, settings, 'swap_size')
self.append_setting_to(args, settings, 'swap_file')
self.append_setting_to(args, settings, 'yes_to_mmc_selection',
@@ -681,10 +682,14 @@
self.event_queue.put(("start", "unpack"))
while(1):
- if self.create_process.poll() != None: # linaro-media-create
- # has finished.
- self.event_queue.put(("terminate")) # Tell the GUI
- return # Terminate the thread
+ if self.create_process.poll() != None:
+ # linaro-media-create has finished. Tell the GUI the return
+ # code so it can report pass/fail.
+ if self.create_process.returncode:
+ self.event_queue.put("abort")
+ else:
+ self.event_queue.put("terminate")
+ return
self.input = self.create_process.stdout.read(1)