Example #1
0
 def prepare_for_gui_library_change(self, newloc):
     # Must be called with lock held
     for library_id, path in iteritems(self.lmap):
         db = self.loaded_dbs.get(library_id)
         if db is not None and samefile(newloc, path):
             if library_id == self.gui_library_id:
                 # Have to reload db
                 self.loaded_dbs.pop(library_id, None)
                 return
             set_global_state(db)
             return db
Example #2
0
 def prepare_for_gui_library_change(self, newloc):
     # Must be called with lock held
     for library_id, path in self.lmap.iteritems():
         db = self.loaded_dbs.get(library_id)
         if db is not None and samefile(newloc, path):
             if library_id == self.gui_library_id:
                 # Have to reload db
                 self.loaded_dbs.pop(library_id, None)
                 return
             set_global_state(db)
             return db