config: Replace the config file with its new version, rather than copy2/remove.
This commit is contained in:
parent
1707b14691
commit
b3a944c76b
1 changed files with 1 additions and 2 deletions
|
@ -349,8 +349,7 @@ class Config(RawConfigParser):
|
||||||
encoding='utf-8') as fd:
|
encoding='utf-8') as fd:
|
||||||
for line in lines:
|
for line in lines:
|
||||||
fd.write('%s\n' % line)
|
fd.write('%s\n' % line)
|
||||||
copy2(filename, self.file_name)
|
filename.replace(self.file_name)
|
||||||
remove(filename)
|
|
||||||
except:
|
except:
|
||||||
success = False
|
success = False
|
||||||
log.error('Unable to save the config file.', exc_info=True)
|
log.error('Unable to save the config file.', exc_info=True)
|
||||||
|
|
Loading…
Reference in a new issue