def call_contextmanager_exit_function(self, w_func, w_typ, w_val, w_tb):
if w_typ is not self.space.w_None:
# The annotator won't allow to merge exception types with None.
- # Replace it with an object which will break translation when used
- # (except maybe with 'exc_typ is None')
- w_typ = self.space.w_None
+ # Replace it with the exception value...
self.space.call_function(w_func, w_typ, w_val, w_tb)
# Return None so that the flow space statically knows that we didn't