From 8faa0a8fdcf6398d1127c14f26d10e863143d638 Mon Sep 17 00:00:00 2001 From: Ravi Shekhar Jethani Date: Tue, 17 Nov 2015 01:07:48 -0800 Subject: [PATCH] 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 --- cinder/volume/drivers/emc/emc_vmax_https.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- 2.45.2