Commits

Sami Pirbay committed 307e679

Fixed bug when using registry and there are no bookmarks

Comments (0)

Files changed (1)

                 items = p.items(sectionName)
                 self.bookmarks = [i[1] for i in items if i[1] and not i[1].endswith('=')]
         else:
-            # INI file not found, search registry with archaic interface
+            try:
             keys = _enumValues(r"Sessions\%s" % self.sessionkey)
             pathlist = _enumValues(r"Configuration\Bookmarks\Remote\%(UserName)s@%(HostName)s" % keys)
             self.bookmarks = [x for x in pathlist.values() if x]
+            except WindowsError:
+                self.log(r"Can't find bookmarks in Configuration\Bookmarks\Remote\%(UserName)s@%(HostName)s" % keys)
+                pass
 
         self.log("Found %d bookmark(s)" % len(self.bookmarks))