]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix unreachable code pylint issues
authorRajesh Tailor <rajesh.tailor@nttdata.com>
Tue, 29 Sep 2015 07:34:31 +0000 (00:34 -0700)
committerRajesh Tailor <rajesh.tailor@nttdata.com>
Tue, 29 Sep 2015 07:37:33 +0000 (00:37 -0700)
Fixed unreachable code (warning code W0101) pylint issues.

TrivialFix
Change-Id: I1b26952609c609114dc23ffb34609b7a9aed2ebf

cinder/tests/unit/test_srb.py
cinder/volume/drivers/dothill/dothill_client.py
cinder/volume/drivers/ibm/flashsystem_common.py
cinder/volume/drivers/prophetstor/dplcommon.py

index a5cb94ade733171e501fa2c246555ecfb36685af..03701b63235b629a55596ab76bc82482572d42a7 100644 (file)
@@ -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)
index 8f62e7ac80e16e897a7c47debce668d98147f0e4..5eb0a7d083c466d441cbc7de57b4e00132b685be 100644 (file)
@@ -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
 
index 318296b43da3164e4c917f984e4856f276ac0857..f8fa930dbf75bfe08bc4e4436007ab010ed1e5be 100644 (file)
@@ -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):
index a09b9a1059cf305c1eb246232f0cb42560e3069e..0ce4bf0282a926325ae28028899cc4049cc28dbe 100644 (file)
@@ -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