From 348b7a9f7d64094d60ece0460aed02b66c52f1b1 Mon Sep 17 00:00:00 2001 From: Chuck Short Date: Tue, 25 Sep 2018 15:12:11 -0400 Subject: [PATCH] Remove unecessary pass Remove unecessary "pass" where they are not needed. Change-Id: I200a3c0e40720cd53694ae157861d62dee42ab1f Signed-off-by: Chuck Short --- .pylintrc | 1 - cinder/group/api.py | 2 -- cinder/volume/api.py | 2 -- cinder/volume/drivers/fujitsu/eternus_dx_fc.py | 2 -- cinder/volume/drivers/hpe/hpe_3par_base.py | 1 - cinder/volume/drivers/hpe/hpe_3par_common.py | 3 --- cinder/volume/drivers/ibm/flashsystem_common.py | 1 - cinder/volume/drivers/qnap.py | 1 - 8 files changed, 13 deletions(-) diff --git a/.pylintrc b/.pylintrc index d65eb6dd1ea..c723cd37017 100644 --- a/.pylintrc +++ b/.pylintrc @@ -112,7 +112,6 @@ disable= signature-differs, star-args, super-init-not-called, - unnecessary-pass, unpacking-non-sequence, unused-argument, unused-import, diff --git a/cinder/group/api.py b/cinder/group/api.py index 88e87ff6a58..2e0a2a14013 100644 --- a/cinder/group/api.py +++ b/cinder/group/api.py @@ -291,7 +291,6 @@ class API(base.Base): "Do not need to create again.", {'grp': group.id, 'vol_type': volume_type_id}) - pass # Since group snapshot is passed in, the following call will # create a db entry for the volume, but will not call the @@ -374,7 +373,6 @@ class API(base.Base): "Do not need to create again.", {'grp': group.id, 'vol_type': volume_type_id}) - pass # Since source_group is passed in, the following call will # create a db entry for the volume, but will not call the diff --git a/cinder/volume/api.py b/cinder/volume/api.py index cc01c5b6084..11ef480b6a0 100644 --- a/cinder/volume/api.py +++ b/cinder/volume/api.py @@ -1238,8 +1238,6 @@ class API(base.Base): def get_snapshot_metadata_value(self, snapshot, key): LOG.info("Get snapshot metadata value not implemented.", resource=snapshot) - # FIXME(jdg): Huh? Pass? - pass def get_volumes_image_metadata(self, context): context.authorize(vol_meta_policy.GET_POLICY) diff --git a/cinder/volume/drivers/fujitsu/eternus_dx_fc.py b/cinder/volume/drivers/fujitsu/eternus_dx_fc.py index d01a1b7fc8d..9d97c8c2f51 100644 --- a/cinder/volume/drivers/fujitsu/eternus_dx_fc.py +++ b/cinder/volume/drivers/fujitsu/eternus_dx_fc.py @@ -51,8 +51,6 @@ class FJDXFCDriver(driver.FibreChannelDriver): LOG.error('pywbem could not be imported! ' 'pywbem is necessary for this volume driver.') - pass - def create_volume(self, volume): """Create volume.""" LOG.debug('create_volume, ' diff --git a/cinder/volume/drivers/hpe/hpe_3par_base.py b/cinder/volume/drivers/hpe/hpe_3par_base.py index 61db07c2d30..97844b64425 100644 --- a/cinder/volume/drivers/hpe/hpe_3par_base.py +++ b/cinder/volume/drivers/hpe/hpe_3par_base.py @@ -89,7 +89,6 @@ class HPE3PARDriverBase(driver.ManageableVD, "time. Since replication is enabled, " "listing replication targets and failing over " "a volume can still be performed.") - pass else: raise return common diff --git a/cinder/volume/drivers/hpe/hpe_3par_common.py b/cinder/volume/drivers/hpe/hpe_3par_common.py index 41e1d6cef67..e54c4c06588 100644 --- a/cinder/volume/drivers/hpe/hpe_3par_common.py +++ b/cinder/volume/drivers/hpe/hpe_3par_common.py @@ -1726,7 +1726,6 @@ class HPE3PARCommon(object): vluns = self.client.getHostVLUNs(hostname) except hpeexceptions.HTTPNotFound: LOG.debug("All VLUNs removed from host %s", hostname) - pass if wwn is not None and not isinstance(wwn, list): wwn = [wwn] @@ -3415,7 +3414,6 @@ class HPE3PARCommon(object): "combination: %(host)s, %(vol)s", {'host': host['name'], 'vol': vol_name}) - pass return existing_vlun def find_existing_vluns(self, volume, host): @@ -3433,7 +3431,6 @@ class HPE3PARCommon(object): "combination: %(host)s, %(vol)s", {'host': host['name'], 'vol': vol_name}) - pass return existing_vluns # v2 replication methods diff --git a/cinder/volume/drivers/ibm/flashsystem_common.py b/cinder/volume/drivers/ibm/flashsystem_common.py index 4b3618cd9f6..76982cab230 100644 --- a/cinder/volume/drivers/ibm/flashsystem_common.py +++ b/cinder/volume/drivers/ibm/flashsystem_common.py @@ -1218,4 +1218,3 @@ class FlashSystemDriver(san.SanDriver, """Removes the specified volume from Cinder management.""" LOG.debug('unmanage: volume %(vol)s is no longer managed by cinder.', {'vol': volume}) - pass diff --git a/cinder/volume/drivers/qnap.py b/cinder/volume/drivers/qnap.py index 919787a9598..f939774a06f 100644 --- a/cinder/volume/drivers/qnap.py +++ b/cinder/volume/drivers/qnap.py @@ -535,7 +535,6 @@ class QnapISCSIDriver(san.SanISCSIDriver): self.api_executor.delete_snapshot_api(snapshot_id) elif 'ES' in internal_model_name.upper(): LOG.debug('in ES FW: do nothing') - pass _metadata = self._get_volume_metadata(volume) _metadata['LUNIndex'] = lun_index _metadata['LUNNAA'] = lun_naa