Use shutil.copy2 to preserve file dates

This commit is contained in:
Douglas Clowes
2014-07-07 13:59:03 +10:00
parent 47d5604e1e
commit 737e56670b

View File

@ -312,7 +312,7 @@ class InstConfigData(object):
self.config_filename + "." + str(idx + 1))
if os.path.exists(self.config_filename):
shutil.copy(self.config_filename, self.config_filename + ".1")
shutil.copy2(self.config_filename, self.config_filename + ".1")
def write_config_file(self):
""" Write out InstConfigData values to the configuration file."""