Fix Boot from Device error when no block devices were found
fixes QubesOS/qubes-issues#6018
This commit is contained in:
parent
6180f0a899
commit
e9231d3448
@ -115,12 +115,18 @@ class VMBootFromDeviceWindow(ui_bootfromdevice.Ui_BootDialog,
|
|||||||
# insufficient permissions
|
# insufficient permissions
|
||||||
pass
|
pass
|
||||||
|
|
||||||
utils.initialize_widget(
|
if device_choice:
|
||||||
widget=self.blockDeviceComboBox,
|
utils.initialize_widget(
|
||||||
choices=device_choice,
|
widget=self.blockDeviceComboBox,
|
||||||
selected_value=device_choice[0][1],
|
choices=device_choice,
|
||||||
add_current_label=False
|
selected_value=device_choice[0][1],
|
||||||
)
|
add_current_label=False
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
self.blockDeviceRadioButton.setEnabled(False)
|
||||||
|
self.blockDeviceComboBox.setEnabled(False)
|
||||||
|
self.blockDeviceComboBox.addItem("no block devices found!")
|
||||||
|
self.blockDeviceComboBox.setCurrentIndex(0)
|
||||||
|
|
||||||
def radio_button_clicked(self):
|
def radio_button_clicked(self):
|
||||||
self.blockDeviceComboBox.setEnabled(
|
self.blockDeviceComboBox.setEnabled(
|
||||||
|
Loading…
Reference in New Issue
Block a user