Removing unnecessary pass instructions
There are some files in Tempest where code has unnecessary pass instructions. This CR fixes that. Change-Id: Ie32399d731edad8a4d0b9cdec8aa7e9444eda254
This commit is contained in:
parent
38adb4b152
commit
4693783f7e
@ -173,7 +173,6 @@ class BaseComputeTest(tempest.test.BaseTestCase):
|
|||||||
pass
|
pass
|
||||||
except Exception:
|
except Exception:
|
||||||
LOG.exception('Exception raised deleting image %s' % image_id)
|
LOG.exception('Exception raised deleting image %s' % image_id)
|
||||||
pass
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def clear_security_groups(cls):
|
def clear_security_groups(cls):
|
||||||
@ -188,7 +187,6 @@ class BaseComputeTest(tempest.test.BaseTestCase):
|
|||||||
LOG.info('Exception raised deleting security group %s',
|
LOG.info('Exception raised deleting security group %s',
|
||||||
sg['id'])
|
sg['id'])
|
||||||
LOG.exception(exc)
|
LOG.exception(exc)
|
||||||
pass
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
@ -320,7 +318,6 @@ class BaseComputeTest(tempest.test.BaseTestCase):
|
|||||||
cls.servers_client.wait_for_server_termination(server_id)
|
cls.servers_client.wait_for_server_termination(server_id)
|
||||||
except Exception:
|
except Exception:
|
||||||
LOG.exception('Failed to delete server %s' % server_id)
|
LOG.exception('Failed to delete server %s' % server_id)
|
||||||
pass
|
|
||||||
resp, server = cls.create_test_server(wait_until='ACTIVE', **kwargs)
|
resp, server = cls.create_test_server(wait_until='ACTIVE', **kwargs)
|
||||||
if cls._api_version == 2:
|
if cls._api_version == 2:
|
||||||
cls.password = server['adminPass']
|
cls.password = server['adminPass']
|
||||||
|
@ -404,7 +404,6 @@ class IsolatedCreds(object):
|
|||||||
except exceptions.NotFound:
|
except exceptions.NotFound:
|
||||||
LOG.warn('router with name: %s not found for delete' %
|
LOG.warn('router with name: %s not found for delete' %
|
||||||
router_name)
|
router_name)
|
||||||
pass
|
|
||||||
|
|
||||||
def _clear_isolated_subnet(self, subnet_id, subnet_name):
|
def _clear_isolated_subnet(self, subnet_id, subnet_name):
|
||||||
net_client = self.network_admin_client
|
net_client = self.network_admin_client
|
||||||
@ -413,7 +412,6 @@ class IsolatedCreds(object):
|
|||||||
except exceptions.NotFound:
|
except exceptions.NotFound:
|
||||||
LOG.warn('subnet with name: %s not found for delete' %
|
LOG.warn('subnet with name: %s not found for delete' %
|
||||||
subnet_name)
|
subnet_name)
|
||||||
pass
|
|
||||||
|
|
||||||
def _clear_isolated_network(self, network_id, network_name):
|
def _clear_isolated_network(self, network_id, network_name):
|
||||||
net_client = self.network_admin_client
|
net_client = self.network_admin_client
|
||||||
@ -422,7 +420,6 @@ class IsolatedCreds(object):
|
|||||||
except exceptions.NotFound:
|
except exceptions.NotFound:
|
||||||
LOG.warn('network with name: %s not found for delete' %
|
LOG.warn('network with name: %s not found for delete' %
|
||||||
network_name)
|
network_name)
|
||||||
pass
|
|
||||||
|
|
||||||
def _cleanup_ports(self, network_id):
|
def _cleanup_ports(self, network_id):
|
||||||
# TODO(mlavalle) This method will be removed once patch
|
# TODO(mlavalle) This method will be removed once patch
|
||||||
@ -468,7 +465,6 @@ class IsolatedCreds(object):
|
|||||||
except exceptions.NotFound:
|
except exceptions.NotFound:
|
||||||
LOG.warn('router with name: %s not found for delete' %
|
LOG.warn('router with name: %s not found for delete' %
|
||||||
router['name'])
|
router['name'])
|
||||||
pass
|
|
||||||
self._clear_isolated_router(router['id'], router['name'])
|
self._clear_isolated_router(router['id'], router['name'])
|
||||||
if (not self.network_resources or
|
if (not self.network_resources or
|
||||||
self.network_resources.get('network')):
|
self.network_resources.get('network')):
|
||||||
@ -492,10 +488,8 @@ class IsolatedCreds(object):
|
|||||||
except exceptions.NotFound:
|
except exceptions.NotFound:
|
||||||
LOG.warn("user with name: %s not found for delete" %
|
LOG.warn("user with name: %s not found for delete" %
|
||||||
creds.username)
|
creds.username)
|
||||||
pass
|
|
||||||
try:
|
try:
|
||||||
self._delete_tenant(creds.tenant_id)
|
self._delete_tenant(creds.tenant_id)
|
||||||
except exceptions.NotFound:
|
except exceptions.NotFound:
|
||||||
LOG.warn("tenant with name: %s not found for delete" %
|
LOG.warn("tenant with name: %s not found for delete" %
|
||||||
creds.tenant_name)
|
creds.tenant_name)
|
||||||
pass
|
|
||||||
|
@ -101,7 +101,6 @@ class InstallVenv(object):
|
|||||||
print('done.')
|
print('done.')
|
||||||
else:
|
else:
|
||||||
print("venv already exists...")
|
print("venv already exists...")
|
||||||
pass
|
|
||||||
|
|
||||||
def pip_install(self, *args):
|
def pip_install(self, *args):
|
||||||
self.run_command(['tools/with_venv.sh',
|
self.run_command(['tools/with_venv.sh',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user