From 25b9f83609086b152e2dfca3fab04ae85c58691d Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Tue, 15 Apr 2014 12:19:32 -0500 Subject: python: write distutils.cfg atomically --- Library/Formula/python.rb | 3 +-- Library/Formula/python3.rb | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/python.rb b/Library/Formula/python.rb index f05648b3e..5b4f214d8 100644 --- a/Library/Formula/python.rb +++ b/Library/Formula/python.rb @@ -176,8 +176,7 @@ class Python < Formula # And now we write the distutils.cfg cfg = lib_cellar/"distutils/distutils.cfg" - cfg.delete if cfg.exist? - cfg.write <<-EOF.undent + cfg.atomic_write <<-EOF.undent [global] verbose=1 [install] diff --git a/Library/Formula/python3.rb b/Library/Formula/python3.rb index 7424e77eb..581cae744 100644 --- a/Library/Formula/python3.rb +++ b/Library/Formula/python3.rb @@ -156,8 +156,7 @@ class Python3 < Formula # And now we write the distutils.cfg cfg = prefix/"Frameworks/Python.framework/Versions/#{VER}/lib/python#{VER}/distutils/distutils.cfg" - cfg.delete if cfg.exist? - cfg.write <<-EOF.undent + cfg.atomic_write <<-EOF.undent [global] verbose=1 [install] -- cgit v1.2.3