From 61ef08eb47d2ab96c046ba3acdb2e51f641ec837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sat, 5 Jul 2014 14:57:47 +0200 Subject: [PATCH] settings: cast all QString to str QString does not have "startswith" method. --- qubesmanager/settings.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qubesmanager/settings.py b/qubesmanager/settings.py index f48cc3f..b2f653a 100755 --- a/qubesmanager/settings.py +++ b/qubesmanager/settings.py @@ -360,7 +360,7 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog): #vm template changed try: if self.template_name.currentIndex() != self.template_idx: - new_template_name = self.template_name.currentText() + new_template_name = str(self.template_name.currentText()) new_template_name = new_template_name.split(' ')[0] template_vm = self.qvm_collection.get_vm_by_name(new_template_name) assert (template_vm is not None and template_vm.qid in self.qvm_collection) @@ -373,7 +373,7 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog): #vm netvm changed try: if self.netVM.currentIndex() != self.netvm_idx: - new_netvm_name = self.netVM.currentText() + new_netvm_name = str(self.netVM.currentText()) new_netvm_name = new_netvm_name.split(' ')[0] uses_default_netvm = False @@ -589,7 +589,7 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog): if hasattr(self.vm, "kernel") and self.kernel_groupbox.isVisible(): try: if self.kernel.currentIndex() != self.kernel_idx: - new_kernel = self.kernel.currentText() + new_kernel = str(self.kernel.currentText()) new_kernel = new_kernel.split(' ')[0] if new_kernel == "default": kernel = self.qvm_collection.get_default_kernel() @@ -631,7 +631,7 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog): return msg def drive_path_button_pressed(self): - if self.drive_domain.currentText() in ["dom0", "dom0 (current)"]: + if str(self.drive_domain.currentText()) in ["dom0", "dom0 (current)"]: file_dialog = QFileDialog() file_dialog.setReadOnly(True) new_path = file_dialog.getOpenFileName(self, "Select drive image",