From 0ed741c4f3db7e4aee3603e051fdd4bc97f1b2de Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Mon, 21 Nov 2016 10:39:27 +0800 Subject: Add logging message on backing up old file --- fg21sim/configs/manager.py | 1 + fg21sim/products.py | 1 + 2 files changed, 2 insertions(+) diff --git a/fg21sim/configs/manager.py b/fg21sim/configs/manager.py index 964bcfc..5cf9b00 100644 --- a/fg21sim/configs/manager.py +++ b/fg21sim/configs/manager.py @@ -581,6 +581,7 @@ class ConfigManager: # Make a backup with suffix ``.old`` backfile = outfile + ".old" shutil.copyfile(outfile, backfile) + logger.info("Backed up old configuration file as: " + backfile) else: raise OSError("outfile already exists: {0}".format(outfile)) # Write out the configurations diff --git a/fg21sim/products.py b/fg21sim/products.py index 6ffc542..454ff13 100644 --- a/fg21sim/products.py +++ b/fg21sim/products.py @@ -275,6 +275,7 @@ class Products: # Make a backup with suffix ``.old`` backfile = outfile + ".old" shutil.copyfile(outfile, backfile) + logger.info("Backed up old manifest file as: " + backfile) else: raise OSError("File already exists: {0}".format(outfile)) # -- cgit v1.2.2