From ec7ea9d2a7e1c7c15e52c866f8fc9bb84bb0920d Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Fri, 2 Aug 2013 08:36:22 -0400 Subject: bcfg2-crypt: prevent traceback for certain decrypt failures --- src/sbin/bcfg2-crypt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/sbin/bcfg2-crypt') diff --git a/src/sbin/bcfg2-crypt b/src/sbin/bcfg2-crypt index 7102d06a9..0ba84fa0a 100755 --- a/src/sbin/bcfg2-crypt +++ b/src/sbin/bcfg2-crypt @@ -158,6 +158,7 @@ class CfgDecryptor(Decryptor): except Bcfg2.Encryption.EVPError: self.logger.info("Could not decrypt %s with any passphrase" % self.filename) + return False def get_destination_filename(self, original_filename): if original_filename.endswith(".crypt"): @@ -417,7 +418,7 @@ def main(): # pylint: disable=R0912,R0915 if data is None: data = getattr(tool, mode)() - if data is False: + if not data: logger.error("Failed to %s %s, skipping" % (mode, fname)) continue if setup['crypt_stdout']: -- cgit v1.2.3-1-g7c22