From 30882ba70ad627f89ab89af6ffc77cda08de8773 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Tue, 12 Nov 2013 15:44:10 -0500 Subject: bcfg2-crypt: Fixed variable name collision --- src/sbin/bcfg2-crypt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/sbin/bcfg2-crypt') diff --git a/src/sbin/bcfg2-crypt b/src/sbin/bcfg2-crypt index 851d38906..3c2d0f2b6 100755 --- a/src/sbin/bcfg2-crypt +++ b/src/sbin/bcfg2-crypt @@ -288,7 +288,7 @@ class PropertiesDecryptor(Decryptor, PropertiesCryptoMixin): default_xpath = '//*[@encrypted]' def decrypt(self): - decrypted = False + decrypted_any = False xdata = lxml.etree.XML(self.data, parser=XMLParser) for elt in self._get_elements(xdata): try: @@ -300,7 +300,7 @@ class PropertiesDecryptor(Decryptor, PropertiesCryptoMixin): decrypted = Bcfg2.Encryption.ssl_decrypt( elt.text, passphrase, Bcfg2.Encryption.get_algorithm(self.setup)).strip() - decrypted = True + decrypted_any = True except (Bcfg2.Encryption.EVPError, TypeError): self.logger.error("Could not decrypt %s, skipping" % print_xml(elt)) @@ -315,7 +315,7 @@ class PropertiesDecryptor(Decryptor, PropertiesCryptoMixin): # a different key, and wound up with gibberish. self.logger.warning("Decrypted %s to gibberish, skipping" % elt.tag) - if decrypted: + if decrypted_any: return xdata else: raise DecryptError("Failed to decrypt any data in %s" % -- cgit v1.2.3-1-g7c22