summaryrefslogtreecommitdiffstats
path: root/src/sbin/bcfg2-crypt
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-03-26 12:47:14 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-03-26 12:47:14 -0400
commit64eec5fe6a9b640bb77dd65f10f3fac5a586347c (patch)
tree3b3c86bda461ff2232b9f30b0d1e873f2b6a1b9a /src/sbin/bcfg2-crypt
parent9673ba716310f50855cba74195e53878316af886 (diff)
downloadbcfg2-64eec5fe6a9b640bb77dd65f10f3fac5a586347c.tar.gz
bcfg2-64eec5fe6a9b640bb77dd65f10f3fac5a586347c.tar.bz2
bcfg2-64eec5fe6a9b640bb77dd65f10f3fac5a586347c.zip
testsuite: fixed issues found by latest version of pep8
Diffstat (limited to 'src/sbin/bcfg2-crypt')
-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 eae316da5..aad89882f 100755
--- a/src/sbin/bcfg2-crypt
+++ b/src/sbin/bcfg2-crypt
@@ -161,8 +161,8 @@ class Encryptor(object):
continue
except TypeError:
pchunk = None
- for pname, passphrase in \
- Bcfg2.Encryption.get_passphrases(self.setup).items():
+ passphrases = Bcfg2.Encryption.get_passphrases(self.setup)
+ for pname, passphrase in passphrases.items():
self.logger.debug("Trying passphrase %s" % pname)
try:
pchunk = self._decrypt(chunk, passphrase)
@@ -341,7 +341,7 @@ class PropertiesEncryptor(Encryptor):
# actually need to unchunk anything
xdata = data[0]
# find root element
- while xdata.getparent() != None:
+ while xdata.getparent() is not None:
xdata = xdata.getparent()
return lxml.etree.tostring(xdata,
xml_declaration=False,