From 737e56670b4e5d7df6d07cd47f570ea180e6e15e Mon Sep 17 00:00:00 2001 From: Douglas Clowes Date: Mon, 7 Jul 2014 13:59:03 +1000 Subject: [PATCH] Use shutil.copy2 to preserve file dates --- site_ansto/instrument/util/config_edit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site_ansto/instrument/util/config_edit.py b/site_ansto/instrument/util/config_edit.py index a051d82b..c94e7d9a 100755 --- a/site_ansto/instrument/util/config_edit.py +++ b/site_ansto/instrument/util/config_edit.py @@ -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."""