From: Rajesh Tailor Date: Tue, 29 Sep 2015 07:34:31 +0000 (-0700) Subject: Fix unreachable code pylint issues X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=54035906f26bad9d5056e496b1391d310129267a;p=openstack-build%2Fcinder-build.git Fix unreachable code pylint issues Fixed unreachable code (warning code W0101) pylint issues. TrivialFix Change-Id: I1b26952609c609114dc23ffb34609b7a9aed2ebf --- diff --git a/cinder/tests/unit/test_srb.py b/cinder/tests/unit/test_srb.py index a5cb94ade..03701b632 100644 --- a/cinder/tests/unit/test_srb.py +++ b/cinder/tests/unit/test_srb.py @@ -155,7 +155,6 @@ class SRBRetryTestCase(test.TestCase): def _try_failing(self): self.attempts = self.attempts + 1 raise processutils.ProcessExecutionError("Fail everytime") - return True try: ret = _try_failing(self) diff --git a/cinder/volume/drivers/dothill/dothill_client.py b/cinder/volume/drivers/dothill/dothill_client.py index 8f62e7ac8..5eb0a7d08 100644 --- a/cinder/volume/drivers/dothill/dothill_client.py +++ b/cinder/volume/drivers/dothill/dothill_client.py @@ -272,7 +272,7 @@ class DotHillClient(object): if count >= 5: LOG.error(_LE('Error in copying volume: %s'), src_name) raise exception.DotHillRequestError - break + time.sleep(1) count += 1 diff --git a/cinder/volume/drivers/ibm/flashsystem_common.py b/cinder/volume/drivers/ibm/flashsystem_common.py index 318296b43..f8fa930db 100644 --- a/cinder/volume/drivers/ibm/flashsystem_common.py +++ b/cinder/volume/drivers/ibm/flashsystem_common.py @@ -789,9 +789,8 @@ class FlashSystemDriver(san.SanDriver): 'via the path %(path)s.') % {'path': host_device}) raise exception.VolumeBackendAPIException(data=msg) - return device - LOG.debug('leave: _scan_device') + return device @utils.synchronized('flashsystem-unmap', external=True) def _unmap_vdisk_from_host(self, vdisk_name, connector): diff --git a/cinder/volume/drivers/prophetstor/dplcommon.py b/cinder/volume/drivers/prophetstor/dplcommon.py index a09b9a105..0ce4bf028 100644 --- a/cinder/volume/drivers/prophetstor/dplcommon.py +++ b/cinder/volume/drivers/prophetstor/dplcommon.py @@ -173,7 +173,6 @@ class DPLCommand(object): 'expects': expected_status}) if response.status == http_client.UNAUTHORIZED: raise exception.NotAuthorized - retcode = errno.EACCES else: retcode = errno.EIO elif retcode == 0 and response.status is http_client.NOT_FOUND: @@ -784,8 +783,6 @@ class DPLCOMMONDriver(driver.ConsistencyGroupVD, driver.ExtendVD, '(%(status)s).'), {'volume': eventid, 'status': e}) raise loopingcall.LoopingCallDone(retvalue=False) - status['state'] = 'error' - fExit = True if fExit is True: break