

def cleanup(logger, *args):
    "Environment's cleanup routine."
    for obj in args:
        if ((logger is not None) and hasattr(obj, 'cleanup')):
            try:
                obj.cleanup()
            except NotImplementedError:
                pass
            except Exception:
                logger.exception('Unable to cleanup %s object', obj)

dataset/ETHPy150Open F-Secure/see/see/environment.py cleanup/VarMisuse@25/35 `obj`->`logger`