summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-07-08 10:56:45 +0200
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-07-08 10:56:45 +0200
commitb3a944c76bc5e72ed7627ed0de3e17006544b912 (patch)
tree52f5af9d2656f5e63a9f259e3ee91640790eab0a
parent1707b1469132d31418384902b25a1a2f5eea0f87 (diff)
downloadpoezio-b3a944c76bc5e72ed7627ed0de3e17006544b912.tar.gz
poezio-b3a944c76bc5e72ed7627ed0de3e17006544b912.tar.bz2
poezio-b3a944c76bc5e72ed7627ed0de3e17006544b912.tar.xz
poezio-b3a944c76bc5e72ed7627ed0de3e17006544b912.zip
config: Replace the config file with its new version, rather than copy2/remove.
-rw-r--r--poezio/config.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/poezio/config.py b/poezio/config.py
index 8970ab98..3c392714 100644
--- a/poezio/config.py
+++ b/poezio/config.py
@@ -349,8 +349,7 @@ class Config(RawConfigParser):
encoding='utf-8') as fd:
for line in lines:
fd.write('%s\n' % line)
- copy2(filename, self.file_name)
- remove(filename)
+ filename.replace(self.file_name)
except:
success = False
log.error('Unable to save the config file.', exc_info=True)