diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-09-13 15:21:09 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-09-13 15:21:09 -0400 |
commit | d81674cc05d820bfd9cced9bbf30717f8fd2b468 (patch) | |
tree | 49d618329719958e8420259a21b8d2978f127a93 /src/lib | |
parent | ba6cda25f5e659efd33431fe136e18f906eabbae (diff) | |
download | bcfg2-d81674cc05d820bfd9cced9bbf30717f8fd2b468.tar.gz bcfg2-d81674cc05d820bfd9cced9bbf30717f8fd2b468.tar.bz2 bcfg2-d81674cc05d820bfd9cced9bbf30717f8fd2b468.zip |
bcfg2-crypt: better debug logging
Diffstat (limited to 'src/lib')
-rwxr-xr-x | src/lib/Bcfg2/Server/Encryption.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Server/Encryption.py b/src/lib/Bcfg2/Server/Encryption.py index f0f83c7e2..6169d4da7 100755 --- a/src/lib/Bcfg2/Server/Encryption.py +++ b/src/lib/Bcfg2/Server/Encryption.py @@ -524,6 +524,7 @@ class CLI(object): continue if props: + ftype = "Properties" if Bcfg2.Options.setup.remove: self.logger.info("Cannot use --remove with Properties " "file %s, ignoring for this file" % fname) @@ -538,6 +539,7 @@ class CLI(object): (fname, err)) continue else: + ftype = "Cfg" if Bcfg2.Options.setup.xpath: self.logger.error("Specifying --xpath with --cfg is " "nonsensical, ignoring --xpath") @@ -561,16 +563,21 @@ class CLI(object): if Bcfg2.Options.setup.encrypt: tool = tools[0] mode = "encrypt" + self.logger.debug("Encrypting %s file %s" % (ftype, fname)) elif Bcfg2.Options.setup.decrypt: tool = tools[1] mode = "decrypt" + self.logger.debug("Decrypting %s file %s" % (ftype, fname)) else: self.logger.info("Neither --encrypt nor --decrypt specified, " "determining mode") tool = tools[1] try: + self.logger.debug("Trying to decrypt %s file %s" % (ftype, + fname)) data = tool.decrypt() mode = "decrypt" + self.logger.debug("Decrypted %s file %s" % (ftype, fname)) except: # pylint: disable=W0702 pass if data is False: |