summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nova/api/openstack/v2/contrib/simple_tenant_usage.py4
-rw-r--r--nova/compute/manager.py10
-rw-r--r--nova/testing/runner.py2
-rw-r--r--nova/utils.py2
-rw-r--r--nova/virt/xenapi/vm_utils.py2
-rw-r--r--nova/volume/driver.py2
-rw-r--r--nova/vsa/api.py2
-rw-r--r--setup.py2
8 files changed, 13 insertions, 13 deletions
diff --git a/nova/api/openstack/v2/contrib/simple_tenant_usage.py b/nova/api/openstack/v2/contrib/simple_tenant_usage.py
index dedc32b443..c93fb55504 100644
--- a/nova/api/openstack/v2/contrib/simple_tenant_usage.py
+++ b/nova/api/openstack/v2/contrib/simple_tenant_usage.py
@@ -157,10 +157,10 @@ class SimpleTenantUsageController(object):
return dtstr
try:
return datetime.strptime(dtstr, "%Y-%m-%dT%H:%M:%S")
- except:
+ except Exception:
try:
return datetime.strptime(dtstr, "%Y-%m-%dT%H:%M:%S.%f")
- except:
+ except Exception:
return datetime.strptime(dtstr, "%Y-%m-%d %H:%M:%S.%f")
def _get_datetime_range(self, req):
diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index c8ae6fab13..40ef65923c 100644
--- a/nova/compute/manager.py
+++ b/nova/compute/manager.py
@@ -323,7 +323,7 @@ class ComputeManager(manager.SchedulerDependentManager):
if instance['task_state'] == task_states.DELETING:
return True
return False
- except:
+ except Exception:
return True
def _shutdown_instance_even_if_deleted(self, context, instance_uuid):
@@ -362,7 +362,7 @@ class ComputeManager(manager.SchedulerDependentManager):
instance = self._spawn(context, instance, image_meta,
network_info, block_device_info,
injected_files, admin_password)
- except:
+ except Exception:
with utils.save_and_reraise_exception():
self._deallocate_network(context, instance)
self._notify_about_instance_usage(instance)
@@ -460,7 +460,7 @@ class ComputeManager(manager.SchedulerDependentManager):
network_info = self.network_api.allocate_for_instance(
context, instance, vpn=is_vpn,
requested_networks=requested_networks)
- except:
+ except Exception:
msg = _("Instance %s failed network setup")
LOG.exception(msg % instance['uuid'])
raise
@@ -475,7 +475,7 @@ class ComputeManager(manager.SchedulerDependentManager):
try:
mapping = self._setup_block_device_mapping(context, instance)
swap, ephemerals, block_device_mapping = mapping
- except:
+ except Exception:
msg = _("Instance %s failed block device setup")
LOG.exception(msg % instance['uuid'])
raise
@@ -495,7 +495,7 @@ class ComputeManager(manager.SchedulerDependentManager):
try:
self.driver.spawn(context, instance, image_meta,
network_info, block_device_info)
- except:
+ except Exception:
msg = _("Instance %s failed to spawn")
LOG.exception(msg % instance['uuid'])
raise
diff --git a/nova/testing/runner.py b/nova/testing/runner.py
index 794fa38457..39e8d7d8c8 100644
--- a/nova/testing/runner.py
+++ b/nova/testing/runner.py
@@ -107,7 +107,7 @@ class _AnsiColorizer(object):
except curses.error:
curses.setupterm()
return curses.tigetnum("colors") > 2
- except:
+ except Exception:
raise
# guess false in case of error
return False
diff --git a/nova/utils.py b/nova/utils.py
index f67eb67d3f..9fb92f08da 100644
--- a/nova/utils.py
+++ b/nova/utils.py
@@ -1090,7 +1090,7 @@ def save_and_reraise_exception():
type_, value, traceback = sys.exc_info()
try:
yield
- except:
+ except Exception:
LOG.exception(_('Original exception being dropped'),
exc_info=(type_, value, traceback))
raise
diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py
index bb31a79fbf..fdb626d26d 100644
--- a/nova/virt/xenapi/vm_utils.py
+++ b/nova/virt/xenapi/vm_utils.py
@@ -482,7 +482,7 @@ class VMHelper(HelperBase):
# 4. Create VBD between instance VM and swap VDI
volume_utils.VolumeHelper.create_vbd(
session, vm_ref, vdi_ref, userdevice, bootable=False)
- except:
+ except Exception:
with utils.save_and_reraise_exception():
cls.destroy_vdi(session, vdi_ref)
diff --git a/nova/volume/driver.py b/nova/volume/driver.py
index 80761d604e..475a5434c9 100644
--- a/nova/volume/driver.py
+++ b/nova/volume/driver.py
@@ -870,7 +870,7 @@ class ZadaraBEDriver(ISCSIDriver):
volume['host'])
try:
ret = self._common_be_export(context, volume, iscsi_target)
- except:
+ except Exception:
raise exception.ProcessExecutionError
return ret
diff --git a/nova/vsa/api.py b/nova/vsa/api.py
index 18cf137057..7635b51c50 100644
--- a/nova/vsa/api.py
+++ b/nova/vsa/api.py
@@ -253,7 +253,7 @@ class API(base.Base):
volume_type=vol_type,
metadata=dict(to_vsa_id=str(vsa_id)),
availability_zone=availability_zone)
- except:
+ except Exception:
self.update_vsa_status(context, vsa_id,
status=VsaState.PARTIAL)
raise
diff --git a/setup.py b/setup.py
index f44acfcbf8..8aa2a6a12a 100644
--- a/setup.py
+++ b/setup.py
@@ -55,7 +55,7 @@ try:
BuildDoc.run(self)
nova_cmdclass['build_sphinx'] = local_BuildDoc
-except:
+except Exception:
pass