def context(*args, **kwds): drive.setup_shared_memory() drive.setup_opencv() try: yield None finally: drive.close_shared_memory() drive.close_opencv()
def context(*args, **kwds): drive.setup_shared_memory() drive.setup_opencv() driving_log = open(log_name, 'a') try: yield driving_log finally: drive.close_shared_memory() drive.close_opencv() driving_log.close()