summaryrefslogtreecommitdiffstats
path: root/src/sbin
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-11-12 15:44:10 -0500
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-11-12 15:44:10 -0500
commit30882ba70ad627f89ab89af6ffc77cda08de8773 (patch)
tree851a21bafd6694086896634a29c244d773a21904 /src/sbin
parent0b1e543b2de0e8dccb986d758fe9c65a0366b9f6 (diff)
downloadbcfg2-30882ba70ad627f89ab89af6ffc77cda08de8773.tar.gz
bcfg2-30882ba70ad627f89ab89af6ffc77cda08de8773.tar.bz2
bcfg2-30882ba70ad627f89ab89af6ffc77cda08de8773.zip
bcfg2-crypt: Fixed variable name collision
Diffstat (limited to 'src/sbin')
-rwxr-xr-xsrc/sbin/bcfg2-crypt6
1 files changed, 3 insertions, 3 deletions
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" %