equal
deleted
inserted
replaced
131 if shortname in _extensions: |
131 if shortname in _extensions: |
132 continue |
132 continue |
133 |
133 |
134 for fn in _aftercallbacks[shortname]: |
134 for fn in _aftercallbacks[shortname]: |
135 fn(loaded=False) |
135 fn(loaded=False) |
|
136 |
|
137 # loadall() is called multiple times and lingering _aftercallbacks |
|
138 # entries could result in double execution. See issue4646. |
|
139 _aftercallbacks.clear() |
136 |
140 |
137 def afterloaded(extension, callback): |
141 def afterloaded(extension, callback): |
138 '''Run the specified function after a named extension is loaded. |
142 '''Run the specified function after a named extension is loaded. |
139 |
143 |
140 If the named extension is already loaded, the callback will be called |
144 If the named extension is already loaded, the callback will be called |