summaryrefslogtreecommitdiff
path: root/nova/api/validation
diff options
context:
space:
mode:
Diffstat (limited to 'nova/api/validation')
-rw-r--r--nova/api/validation/validators.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/nova/api/validation/validators.py b/nova/api/validation/validators.py
index 2ae5dfe907..8b79f03a21 100644
--- a/nova/api/validation/validators.py
+++ b/nova/api/validation/validators.py
@@ -47,6 +47,10 @@ def _validate_base64_format(instance):
base64.decodestring(instance)
except base64.binascii.Error:
return False
+ except TypeError:
+ # The name must be string type. If instance isn't string type, the
+ # TypeError will be raised at here.
+ return False
return True