Commits

Yuya Nishihara committed d6eca4d

workbench: fix unicode error while loading the last session

Comments (0)

Files changed (1)

tortoisehg/hgqt/workbench.py

         # Reload the all the repos that were open on the last session
         # This may be a lengthy operation, which happens before the Workbench GUI is open
         # We use a progress dialog to let the user know that the workbench is being loaded
-        openrepos = hglib.fromunicode(s.value(wb + 'openrepos').toString()).split(',')
-        for n, path in enumerate(openrepos):
+        openrepos = unicode(s.value(wb + 'openrepos').toString()).split(',')
+        for n, upath in enumerate(openrepos):
             self.progress(_('Reopening tabs'), n,
-                          _('Reopening repository %s') % path, '',
+                          _('Reopening repository %s') % upath, '',
                           len(openrepos))
             QCoreApplication.processEvents()
-            self._openRepo(path, False)
+            self._openRepo(hglib.fromunicode(upath), False)
             QCoreApplication.processEvents()
         self.progress(_('Reopening tabs'), len(openrepos),
                       _('All repositories open'), '', len(openrepos))