diff --git a/update_local_config.py b/update_local_config.py index 3bc88ac..2c30ca6 100644 --- a/update_local_config.py +++ b/update_local_config.py @@ -62,7 +62,7 @@ def main(): updated_content = replace_peer_section(config_content, new_peer_section) # Step 4: Save the updated configuration file - with tempfile.TemporaryDirectory(delete=False, mode='w') as tempdir: + with tempfile.TemporaryDirectory() as tempdir: temp_file = pathlib.Path(tempdir) / f"{interface}.conf" temp_file_path = str(temp_file)