summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2008-04-01 23:36:06 +0000
committerNarayan Desai <desai@mcs.anl.gov>2008-04-01 23:36:06 +0000
commit7eba962c381746f5d97199c5d092a2f0e3634e64 (patch)
tree36a72011694aa7f437ade113fc8584d6f57807ee /src
parent3220e62901c5a5f04828f9c029ad7421d3f09468 (diff)
downloadbcfg2-7eba962c381746f5d97199c5d092a2f0e3634e64.tar.gz
bcfg2-7eba962c381746f5d97199c5d092a2f0e3634e64.tar.bz2
bcfg2-7eba962c381746f5d97199c5d092a2f0e3634e64.zip
Fix and simplify fingerprint verification code
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4468 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rwxr-xr-xsrc/sbin/bcfg214
1 files changed, 6 insertions, 8 deletions
diff --git a/src/sbin/bcfg2 b/src/sbin/bcfg2
index 2ca7ef92f..472eab795 100755
--- a/src/sbin/bcfg2
+++ b/src/sbin/bcfg2
@@ -39,14 +39,12 @@ class FPProxyCall(object):
self.method = getattr(self.proxy.proxy, method)
def __call__(self, *args):
- while self.proxy.no_fingerprint or self.proxy.fingerprints:
- try:
- return self.method(*args)
- except Bcfg2.tlslite.errors.TLSFingerprintError:
- self.proxy.proxy = self.proxy.get_proxy()
- self.method = getattr(self.proxy.proxy, self.method_name)
- logger.error("Ran out of valid fingerprints; shutting down")
- raise SystemExit(1)
+ try:
+ return self.method(*args)
+ except Bcfg2.tlslite.errors.TLSFingerprintError:
+ self.proxy.proxy = self.proxy.get_proxy()
+ self.method = getattr(self.proxy.proxy, self.method_name)
+ return self.__call__(*args)
class FPProxy(object):
def __init__(self, url, user, password, fingerprints):