Show More
@@ -183,6 +183,9 b' def _catchterm(*args):' | |||
|
183 | 183 | # retrieving configuration value. |
|
184 | 184 | _unset = object() |
|
185 | 185 | |
|
186 | # _reqexithandlers: callbacks run at the end of a request | |
|
187 | _reqexithandlers = [] | |
|
188 | ||
|
186 | 189 | class ui(object): |
|
187 | 190 | def __init__(self, src=None): |
|
188 | 191 | """Create a fresh new ui object if no src given |
@@ -193,8 +196,6 b' class ui(object):' | |||
|
193 | 196 | """ |
|
194 | 197 | # _buffers: used for temporary capture of output |
|
195 | 198 | self._buffers = [] |
|
196 | # _exithandlers: callbacks run at the end of a request | |
|
197 | self._exithandlers = [] | |
|
198 | 199 | # 3-tuple describing how each buffer in the stack behaves. |
|
199 | 200 | # Values are (capture stderr, capture subprocesses, apply labels). |
|
200 | 201 | self._bufferstates = [] |
@@ -220,7 +221,6 b' class ui(object):' | |||
|
220 | 221 | self._styles = {} |
|
221 | 222 | |
|
222 | 223 | if src: |
|
223 | self._exithandlers = src._exithandlers | |
|
224 | 224 | self.fout = src.fout |
|
225 | 225 | self.ferr = src.ferr |
|
226 | 226 | self.fin = src.fin |
@@ -1098,6 +1098,10 b' class ui(object):' | |||
|
1098 | 1098 | |
|
1099 | 1099 | return True |
|
1100 | 1100 | |
|
1101 | @property | |
|
1102 | def _exithandlers(self): | |
|
1103 | return _reqexithandlers | |
|
1104 | ||
|
1101 | 1105 | def atexit(self, func, *args, **kwargs): |
|
1102 | 1106 | '''register a function to run after dispatching a request |
|
1103 | 1107 |
General Comments 0
You need to be logged in to leave comments.
Login now