]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
BigSwitch: Move attr ref after error check
authorKevin Benton <blak111@gmail.com>
Fri, 28 Mar 2014 00:20:43 +0000 (17:20 -0700)
committerKevin Benton <blak111@gmail.com>
Fri, 28 Mar 2014 00:22:39 +0000 (17:22 -0700)
Change in Big Switch server manager module:
Moves an attribute reference to a line after
the error check that validates the object is
not None.

Closes-Bug: #1298699
Change-Id: I5f9abf3b456d5066e90c05bc6b3aa5adcecb7943

neutron/plugins/bigswitch/servermanager.py

index 0a3cb19129e886007fb9c91644a6fe25cff76304..8792290af6cf8582184f805031a8fe634e6cfe63 100644 (file)
@@ -162,11 +162,11 @@ class ServerProxy(object):
             if self.ssl:
                 self.currentconn = HTTPSConnectionWithValidation(
                     self.server, self.port, timeout=timeout)
-                self.currentconn.combined_cert = self.combined_cert
                 if self.currentconn is None:
                     LOG.error(_('ServerProxy: Could not establish HTTPS '
                                 'connection'))
                     return 0, None, None, None
+                self.currentconn.combined_cert = self.combined_cert
             else:
                 self.currentconn = httplib.HTTPConnection(
                     self.server, self.port, timeout=timeout)