def __init__(self, notice_store, notice_view): GObject.Object.__init__(self) self._store = notice_store self._view = notice_view self._cacher = EntropyCacher() self._nc = None self._avc = None
def __init__(self, activity_rwsem, entropy_client, entropy_ws, nc, bottom_nc, rigo_service, prefc, icons, nf_box, search_entry, search_entry_completion, search_entry_store, store, view): GObject.Object.__init__(self) self._activity_rwsem = activity_rwsem self._entropy = entropy_client self._service = rigo_service self._icons = icons self._entropy_ws = entropy_ws self._search_entry = search_entry self._store = store self._view = view self._nf_box = nf_box self._not_found_search_box = None self._not_found_label = None self._nc = nc self._bottom_nc = bottom_nc self._prefc = prefc self._cacher = EntropyCacher() self._search_thread_mutex = Lock() self._search_completion = search_entry_completion self._search_completion_model = search_entry_store # speedup the damn ListStore self._search_completion_model_set = set() self._search_writeback_mutex = Lock() self._search_writeback_thread = None
def read(): cacher = EntropyCacher() status = cacher.pop(SoloYell._CACHE_KEY) if status is None: status = 0 SoloYell.write(status) return status
def reset(): """ Reset Yell Status. """ cacher = EntropyCacher() try: cacher.save(SoloYell._CACHE_KEY, 0) except IOError: pass
def _clear_resources_after_lock(self): """ Clear resources that could have become stale after the Entropy Lock acquisition. """ cacher = EntropyCacher() with cacher: SystemSettings().clear() cacher.discard() with EntropyResourcesLock._POST_ACQUIRE_HOOK_LOCK: callables = list( EntropyResourcesLock._POST_ACQUIRE_HOOKS.values()) for callab in callables: callab() cacher.sync()
def _cacher(self): """ Return an EntropyCacher object instance. """ with self._real_cacher_lock: if self._real_cacher is None: real_cacher = EntropyCacher() const_debug_write(__name__, "EntropyCacher loaded") # needs to be started here otherwise repository # cache will be always dropped if self.xcache: real_cacher.start() else: # disable STASHING_CACHE or we leak EntropyCacher.STASHING_CACHE = False self._real_cacher = real_cacher return self._real_cacher
def _cacher(self): if self.__cacher is None: self.__cacher = EntropyCacher() return self.__cacher
def write(status): cacher = EntropyCacher() try: cacher.save(SoloYell._CACHE_KEY, status) except IOError: pass
attr = termios.tcgetattr(si) attr[3] = attr[3] & termios.ECHO termios.tcsetattr(si, termios.TCSADRAIN, attr) print("\nEntering debugger...") import pdb pdb.post_mortem(tb) os.kill(os.getpid(), signal.SIGKILL) def runQuit(self, (ty, value, tb)): # see a similar comment at runDebug() try: from sabayon import Entropy from entropy.cache import EntropyCacher EntropyCacher().stop() etp = Entropy() etp.destroy() if hasattr(etp, 'shutdown'): etp.shutdown() except ImportError: pass try: isys.vtActivate(1) except SystemError: pass sys.exit(self.exitcode) def initExceptionHandling(anaconda):