Commits

Yuya Nishihara committed e91c930

workbench: don't show wrong progress on empty last session

If no session saved, openrepos happens to be ['']. As a result,
restoreSettings() calls _openRepo('') and shows corresponding progress.

  • Participants
  • Parent commits ef4b808
  • Branches stable

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 = unicode(s.value(wb + 'openrepos').toString()).split(',')
+        openreposvalue = unicode(s.value(wb + 'openrepos').toString())
+        if openreposvalue:
+            openrepos = openreposvalue.split(',')
+        else:
+            openrepos = []
         for n, upath in enumerate(openrepos):
             self.progress(_('Reopening tabs'), n,
                           _('Reopening repository %s') % upath, '',