summaryrefslogtreecommitdiff
path: root/tools/mock-meta.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/mock-meta.py')
-rwxr-xr-xtools/mock-meta.py5
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