Skip to content

Commit

Permalink
Fix some vm/vm_info confusion
Browse files Browse the repository at this point in the history
  • Loading branch information
donob4n committed May 7, 2020
1 parent 09392f9 commit ef3ac6a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions qubesmanager/qube_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,8 @@ def action_removevm_triggered(self):
# noinspection PyArgumentList
@pyqtSlot(name='on_action_clonevm_triggered')
def action_clonevm_triggered(self):
for vm in self.get_selected_vms():
for vm_info in self.get_selected_vms():
vm = vm_info.vm
name_number = 1
name_format = vm.name + '-clone-%d'
while name_format % name_number in self.qubes_app.domains.keys():
Expand Down Expand Up @@ -1209,14 +1210,14 @@ def action_updatevm_triggered(self):
@pyqtSlot(name='on_action_run_command_in_vm_triggered')
def action_run_command_in_vm_triggered(self):
# pylint: disable=invalid-name
for vm in self.get_selected_vms():
for vm_info in self.get_selected_vms():
(command_to_run, ok) = QInputDialog.getText(
self, self.tr('Qubes command entry'),
self.tr('Run command in <b>{}</b>:').format(vm.name))
self.tr('Run command in <b>{}</b>:').format(vm_info.name))
if not ok or command_to_run == "":
return

thread = RunCommandThread(vm, command_to_run)
thread = RunCommandThread(vm_info.vm, command_to_run)
self.threads_list.append(thread)
thread.finished.connect(self.clear_threads)
thread.start()
Expand All @@ -1234,8 +1235,8 @@ def action_open_console_triggered(self):
@pyqtSlot(name='on_action_set_keyboard_layout_triggered')
def action_set_keyboard_layout_triggered(self):
# pylint: disable=invalid-name
for vm in self.get_selected_vms():
vm.run('qubes-change-keyboard-layout')
for vm_info in self.get_selected_vms():
vm_info.vm.run('qubes-change-keyboard-layout')

# noinspection PyArgumentList
@pyqtSlot(name='on_action_editfwrules_triggered')
Expand Down

0 comments on commit ef3ac6a

Please sign in to comment.