Unused exception.

This commit is contained in:
Steve Pulec 2015-08-01 19:44:37 -04:00
parent 4543db567c
commit ac4aef87a1

View File

@ -100,6 +100,7 @@ from .utils import (
def utc_date_and_time(): def utc_date_and_time():
return datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ') return datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ')
def validate_resource_ids(resource_ids): def validate_resource_ids(resource_ids):
for resource_id in resource_ids: for resource_id in resource_ids:
if not is_valid_resource_id(resource_id): if not is_valid_resource_id(resource_id):
@ -1460,10 +1461,7 @@ class EBSBackend(object):
# Modify instance to capture mount of block device. # Modify instance to capture mount of block device.
bdt = BlockDeviceType(volume_id=volume_id, status=volume.status, size=volume.size, bdt = BlockDeviceType(volume_id=volume_id, status=volume.status, size=volume.size,
attach_time=utc_date_and_time()) attach_time=utc_date_and_time())
try: instance.block_device_mapping[device_path] = bdt
instance.block_device_mapping[device_path] = bdt
except:
instance.block_device_mapping.setdefault(device_path, bdt)
return volume.attachment return volume.attachment
def detach_volume(self, volume_id, instance_id, device_path): def detach_volume(self, volume_id, instance_id, device_path):