def env(): env = build_env_dict() drop_env(env) init_env(env) ENV.update(env) try: yield ENV finally: drop_env(env)
def env(): env = build_env_dict() drop_env(env) init_env(env) ENV.update(env) try: yield ENV finally: copy_file_to_stream(env['agent']['log_file'], sys.stderr) copy_file_to_stream(env['pg']['log_file'], sys.stderr) drop_env(env)
def env(): env = init_env() ENV.update(env) try: yield env except Exception: raise finally: drop_env(env)
def setup_class(cls): global ENV ENV = init_env()