def __exit__(self, exc_type, exc_value, traceback):
    'At the termination of a with command, navigate back to the original directory.'
    runLog.debug('Returning to directory {}'.format(self.initial))
    if ((exc_type is not None) and self._dumpOnException):
        runLog.info('An exception was raised within a DirectoryChanger. Retrieving entire folder for debugging.')
        self._retrieveEntireFolder()
    else:
        self.retrieveFiles()
    self.close()
At the termination of a with command, navigate back to the original directory.
def __exit__(self, exc_type, exc_value, traceback):
    
    runLog.debug('Returning to directory {}'.format(self.initial))
    if ((exc_type is not None) and self._dumpOnException):
        runLog.info('An exception was raised within a DirectoryChanger. Retrieving entire folder for debugging.')
        self._retrieveEntireFolder()
    else:
        self.retrieveFiles()
    self.close()