Remove all traces of the "poll" parameter for the PollScheduler constructor
authorZac Medico <zmedico@gentoo.org>
Sun, 13 Jul 2008 13:38:24 +0000 (13:38 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 13 Jul 2008 13:38:24 +0000 (13:38 -0000)
since it was only used by can_poll_pty().

svn path=/main/trunk/; revision=11040

pym/_emerge/__init__.py

index e03b570725cd23da6515f35853638b7e413bd6c5..2375546cf7d3cfffcfc7aa7013f0bf6c867a520c 100644 (file)
@@ -8026,7 +8026,7 @@ class PollScheduler(object):
        class _sched_iface_class(SlotObject):
                __slots__ = ("register", "schedule", "unregister")
 
-       def __init__(self, poll=None):
+       def __init__(self):
                self._max_jobs = 1
                self._max_load = None
                self._jobs = 0
@@ -8034,9 +8034,7 @@ class PollScheduler(object):
                self._poll_event_handler_ids = {}
                # Increment id for each new handler.
                self._event_handler_id = 0
-               if poll is None:
-                       poll = create_poll_instance()
-               self._poll = poll
+               self._poll = create_poll_instance()
                self._scheduling = False
 
        def _schedule(self):
@@ -8141,8 +8139,8 @@ class QueueScheduler(PollScheduler):
        run() method returns when no tasks remain.
        """
 
-       def __init__(self, max_jobs=None, max_load=None, poll=None):
-               PollScheduler.__init__(self, poll=poll)
+       def __init__(self, max_jobs=None, max_load=None):
+               PollScheduler.__init__(self)
 
                if max_jobs is None:
                        max_jobs = 1
@@ -8216,10 +8214,10 @@ class TaskScheduler(object):
        add tasks and call run(). The run() method returns when no tasks remain.
        """
 
-       def __init__(self, max_jobs=None, max_load=None, poll=None):
+       def __init__(self, max_jobs=None, max_load=None):
                self._queue = SequentialTaskQueue(max_jobs=max_jobs)
                self._scheduler = QueueScheduler(
-                       max_jobs=max_jobs, max_load=max_load, poll=poll)
+                       max_jobs=max_jobs, max_load=max_load)
                self.sched_iface = self._scheduler.sched_iface
                self.run = self._scheduler.run
                self._scheduler.add(self._queue)