From: Ravi Shekhar Jethani Date: Tue, 17 Nov 2015 09:07:48 +0000 (-0800) Subject: Bad exception clauses order X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=8faa0a8fdcf6398d1127c14f26d10e863143d638;p=openstack-build%2Fcinder-build.git Bad exception clauses order A superclass exception (error) is being handled before a sub class exception(SSLError) which is making the latter exception clause unreachable. Corrected the order of these exception clauses. Trivial Fix Change-Id: I82e6f4984b095f50cdd7ffccd9af60ce75d41f7f --- diff --git a/cinder/volume/drivers/emc/emc_vmax_https.py b/cinder/volume/drivers/emc/emc_vmax_https.py index 348186c85..aa9584f47 100644 --- a/cinder/volume/drivers/emc/emc_vmax_https.py +++ b/cinder/volume/drivers/emc/emc_vmax_https.py @@ -333,14 +333,14 @@ def wbem_request(url, data, creds, headers=None, debug=0, x509=None, msg = (_("Bad Status line returned: %(arg)s.") % {'arg': arg}) raise pywbem.cim_http.Error(msg) - except socket.error as arg: - msg = (_("Socket error: %(arg)s.") - % {'arg': arg}) - raise pywbem.cim_http.Error(msg) except socket.sslerror as arg: msg = (_("SSL error: %(arg)s.") % {'arg': arg}) raise pywbem.cim_http.Error(msg) + except socket.error as arg: + msg = (_("Socket error: %(arg)s.") + % {'arg': arg}) + raise pywbem.cim_http.Error(msg) break