diff options
| author | Chmouel Boudjnah <chmouel@chmouel.com> | 2010-12-09 13:43:54 +0000 |
|---|---|---|
| committer | Chmouel Boudjnah <chmouel@chmouel.com> | 2010-12-09 13:43:54 +0000 |
| commit | b35b86c6f415a205b6ce49164cccb2a870c46fcb (patch) | |
| tree | dfa4787da0397e395be5e962cd32f46d37b8609f | |
| parent | 3c114a7dd596dfb12de42577711d97d1a98d10ec (diff) | |
fixes exception throwing with wrong instance type.
| -rw-r--r-- | nova/compute/instance_types.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/compute/instance_types.py b/nova/compute/instance_types.py index a2679e0fc..0e9600c00 100644 --- a/nova/compute/instance_types.py +++ b/nova/compute/instance_types.py @@ -22,6 +22,7 @@ The built-in instance properties. """ from nova import flags +from nova.exception import ApiError FLAGS = flags.FLAGS INSTANCE_TYPES = { @@ -37,8 +38,7 @@ def get_by_type(instance_type): if instance_type is None: return FLAGS.default_instance_type if instance_type not in INSTANCE_TYPES: - raise exception.ApiError("Unknown instance type: %s", - instance_type) + raise ApiError("Unknown instance type: %s" % instance_type) return instance_type |
