From cb941c1a7567d42441340b57cbc4ed8c5ae38f71 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 11 Feb 2012 22:16:57 -0800 Subject: [PATCH] Scheduler: simplify _sched_iface construction --- pym/_emerge/Scheduler.py | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py index 5bb4fe83a..b84f7bb66 100644 --- a/pym/_emerge/Scheduler.py +++ b/pym/_emerge/Scheduler.py @@ -215,22 +215,11 @@ class Scheduler(PollScheduler): fetch_iface = self._fetch_iface_class(log_file=self._fetch_log, schedule=self._schedule_fetch) self._sched_iface = self._iface_class( - IO_ERR=self._event_loop.IO_ERR, - IO_HUP=self._event_loop.IO_HUP, - IO_IN=self._event_loop.IO_IN, - IO_NVAL=self._event_loop.IO_NVAL, - IO_OUT=self._event_loop.IO_OUT, - IO_PRI=self._event_loop.IO_PRI, - fetch=fetch_iface, output=self._task_output, - idle_add=self._event_loop.idle_add, - io_add_watch=self._event_loop.io_add_watch, - iteration=self._event_loop.iteration, - register=self._event_loop.io_add_watch, + fetch=fetch_iface, scheduleSetup=self._schedule_setup, scheduleUnpack=self._schedule_unpack, - source_remove=self._event_loop.source_remove, - timeout_add=self._event_loop.timeout_add, - unregister=self._event_loop.source_remove) + **dict((k, getattr(self.sched_iface, k)) + for k in self.sched_iface.__slots__)) self._prefetchers = weakref.WeakValueDictionary() self._pkg_queue = [] -- 2.26.2