Browse Source

Add missing unicode() wrapper before .format() on QString

self.tr return QString, which do not support python's str.format().

Fixes QubesOS/qubes-issues#2637
Marek Marczykowski-Górecki 7 years ago
parent
commit
3a011da65d
1 changed files with 3 additions and 2 deletions
  1. 3 2
      qubesmanager/main.py

+ 3 - 2
qubesmanager/main.py

@@ -1452,8 +1452,9 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
         thread.start()
         thread.start()
 
 
         progress = QProgressDialog(
         progress = QProgressDialog(
-            self.tr("<b>{0}</b><br>Please wait for the updater to launch...").
-                format(vm.name), "", 0, 0)
+            unicode(
+                self.tr("<b>{0}</b><br>Please wait for the updater to "
+                "launch...")).format(vm.name), "", 0, 0)
         progress.setCancelButton(None)
         progress.setCancelButton(None)
         progress.setModal(True)
         progress.setModal(True)
         progress.show()
         progress.show()