Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 161827 Details for
Bug 233458
sys-apps/portage-2.2_rc5 fetch, traceback on verify-fail
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix bug in exit listener logic
remove_exit_listener.patch (text/plain), 1.58 KB, created by
Zac Medico
on 2008-07-31 10:50:14 UTC
(
hide
)
Description:
fix bug in exit listener logic
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2008-07-31 10:50:14 UTC
Size:
1.58 KB
patch
obsolete
>Index: pym/_emerge/__init__.py >=================================================================== >--- pym/_emerge/__init__.py (revision 11296) >+++ pym/_emerge/__init__.py (revision 11297) >@@ -1599,7 +1599,7 @@ > """ > > __slots__ = ("background", "cancelled", "returncode") + \ >- ("_exit_listeners", "_start_listeners") >+ ("_exit_listeners", "_exit_listener_stack", "_start_listeners") > > def start(self): > """ >@@ -1665,6 +1665,8 @@ > > def removeExitListener(self, f): > if self._exit_listeners is None: >+ if self._exit_listener_stack is not None: >+ self._exit_listener_stack.remove(f) > return > self._exit_listeners.remove(f) > >@@ -1680,12 +1682,22 @@ > > # This prevents recursion, in case one of the > # exit handlers triggers this method again by >- # calling wait(). >- exit_listeners = self._exit_listeners >+ # calling wait(). Use a stack that gives >+ # removeExitListener() an opportunity to consume >+ # listeners from the stack, before they can get >+ # called below. This is necessary because a call >+ # to one exit listener may result in a call to >+ # removeExitListener() for another listener on >+ # the stack. That listener needs to be removed >+ # from the stack since it would be inconsistent >+ # to call it after it has been been passed into >+ # removeExitListener(). >+ self._exit_listener_stack = self._exit_listeners > self._exit_listeners = None > >- for f in exit_listeners: >- f(self) >+ self._exit_listener_stack.reverse() >+ while self._exit_listener_stack: >+ self._exit_listener_stack.pop()(self) > > class PipeReader(AsynchronousTask): >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 233458
: 161827