From: Zac Medico Date: Thu, 25 Dec 2008 01:22:38 +0000 (-0000) Subject: Rename the PollTask class to AbstractPollTask. (trunk r12289) X-Git-Tag: v2.1.6.3~16 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=1260b8b37a655e34a8300419f798881c7b2064e6;p=portage.git Rename the PollTask class to AbstractPollTask. (trunk r12289) svn path=/main/branches/2.1.6/; revision=12318 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index e2cc10626..56842fba5 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -1745,7 +1745,7 @@ class AsynchronousTask(SlotObject): while self._exit_listener_stack: self._exit_listener_stack.pop()(self) -class PollTask(AsynchronousTask): +class AbstractPollTask(AsynchronousTask): __slots__ = ("scheduler",) + \ ("_registered",) @@ -1755,6 +1755,9 @@ class PollTask(AsynchronousTask): _registered_events = PollConstants.POLLIN | PollConstants.POLLHUP | \ _exceptional_events + def _unregister(self): + raise NotImplementedError(self) + def _unregister_if_appropriate(self, event): if self._registered: if event & self._exceptional_events: @@ -1764,7 +1767,7 @@ class PollTask(AsynchronousTask): self._unregister() self.wait() -class PipeReader(PollTask): +class PipeReader(AbstractPollTask): """ Reads output from one or more files and saves it in memory, @@ -2002,7 +2005,7 @@ class TaskSequence(CompositeTask): self._final_exit(task) self.wait() -class SubProcess(PollTask): +class SubProcess(AbstractPollTask): __slots__ = ("pid",) + \ ("_files", "_reg_id")