'Reverse the effects of the previous push_execution_context call.
:raises: :class:`IndexError` when the stack of contexts is empty.'

def pop_execution_context(self):

    if (not self._execution_contexts):
        raise IndexError('No    old    execution    context    to    restore')
    self._resultdir = self._execution_contexts.pop()
