From bc0e8c08563e936eb263a592106f0611018d0211 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Nov 23 2016 16:14:23 +0000 Subject: avoid try..except..finally --- diff --git a/koji/__init__.py b/koji/__init__.py index 6ec6693..3407f74 100644 --- a/koji/__init__.py +++ b/koji/__init__.py @@ -2146,13 +2146,14 @@ class ClientSession(object): self.opts['timeout'] = 60 self.opts['auth'] = HTTPKerberosAuth() try: - # Depending on the server configuration, we might not be able to - # connect without client certificate, which means that the conn - # will fail with a handshake failure, which is retried by default. - sinfo = self._callMethod('sslLogin', [proxyuser], retry=False) - except: - # Auth with https didn't work. Restore for the next attempt. - self.baseurl = old_baseurl + try: + # Depending on the server configuration, we might not be able to + # connect without client certificate, which means that the conn + # will fail with a handshake failure, which is retried by default. + sinfo = self._callMethod('sslLogin', [proxyuser], retry=False) + except: + # Auth with https didn't work. Restore for the next attempt. + self.baseurl = old_baseurl finally: self.opts = old_opts if not sinfo: