From f41d2fdfa6fc443353aec43eec0bfdf5c4dbb5f8 Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Wed, 9 Feb 2011 11:38:16 -0700 Subject: [PATCH] oe.types: for invalid type, list valid ones Signed-off-by: Chris Larson --- lib/oe/types.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/oe/types.py b/lib/oe/types.py index 0fb91db248..86de4b084b 100644 --- a/lib/oe/types.py +++ b/lib/oe/types.py @@ -27,7 +27,8 @@ def factory(var_type): try: return types[var_type] except KeyError: - raise TypeError("Invalid type '%s'" % var_type) + raise TypeError("Invalid type '%s':\n Valid types: %s" % + (var_type, ', '.join(types))) def create(value, var_type, **flags): """Create an object of the specified type, given the specified flags and -- 2.39.5