diff --git a/vmware-esxi/curtin/curtin-hooks b/vmware-esxi/curtin/curtin-hooks index 475a5ee8..8c22caff 100755 --- a/vmware-esxi/curtin/curtin-hooks +++ b/vmware-esxi/curtin/curtin-hooks @@ -31,12 +31,11 @@ from curtin.util import load_command_environment def exec_prog(*cmdline: str) -> None: - with open(os.devnull, "w") as devnull: - subprocess.check_call( - *cmdline, - stdout=devnull, - stderr=subprocess.STDOUT, - ) + subprocess.check_call( + cmdline, + stdout=subprocess.DEVNULL, + stderr=subprocess.STDOUT, + ) def write_config(target, config):