Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions qubesmanager/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ def __init__(self, qt_app, qubes_app, dispatcher, parent=None):
filter_function=(lambda vm:
vm.klass != 'TemplateVM'
and utils.is_running(vm, False)
and not utils.get_feature(vm, 'internal', False)),
allow_internal=True,
),
)
self.appvm_combobox.setCurrentIndex(
self.appvm_combobox.findText("dom0"))
Expand Down
3 changes: 1 addition & 2 deletions qubesmanager/bootfromdevice.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ def __init_buttons__(self):
utils.initialize_widget_with_vms(
widget=self.fileVM,
qubes_app=self.qubesapp,
filter_function=(lambda x: x != self.vm),
allow_internal=True
filter_function=(lambda vm: vm != self.vm and vm.klass != "TemplateVM"),
)

device_choice = []
Expand Down
8 changes: 3 additions & 5 deletions qubesmanager/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,9 @@ def set_organization():
QtCore.QCoreApplication.setApplicationName('qubes-qube-manager')

def is_internal(vm):
"""checks if the VM is either an AdminVM or has the 'internal' features"""
"""checks if the VM has the 'internal' features"""
try:
return (vm.klass == 'AdminVM'
or vm.features.get('internal', False))
return vm.features.get('internal', False)
except exc.QubesDaemonAccessError:
return False

Expand Down Expand Up @@ -278,8 +277,7 @@ def initialize_widget_with_vms(
:param property_name: name of the property
:param allow_default: should a position with qubesadmin.DEFAULT be added;
default False
:param allow_internal: should AdminVMs and vms with feature 'internal' be
used
:param allow_internal: should vms with feature 'internal' be used
:return:
"""
choices = []
Expand Down