diff options
Diffstat (limited to 'tools/mock-meta.py')
-rwxr-xr-x | tools/mock-meta.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/mock-meta.py b/tools/mock-meta.py index a0d99441..95fc4659 100755 --- a/tools/mock-meta.py +++ b/tools/mock-meta.py @@ -259,7 +259,10 @@ class MetaDataHandler(object): try: key_id = int(mybe_key) key_name = key_ids[key_id] - except: + except ValueError: + raise WebException(hclient.BAD_REQUEST, + "%s: not an integer" % mybe_key) + except KeyError: raise WebException(hclient.BAD_REQUEST, "Unknown key id %r" % mybe_key) # Extract the possible sub-params |