[oe-commits] Chris Larson : oe.types: for invalid type, list valid ones
git version control
git at git.openembedded.org
Fri Apr 22 17:52:27 UTC 2011
Module: openembedded.git
Branch: shr/testing2011.1
Commit: 21d6180cc4f70635890d2e986438ab2309faf3ec
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=21d6180cc4f70635890d2e986438ab2309faf3ec
Author: Chris Larson <chris_larson at mentor.com>
Date: Wed Feb 9 11:38:16 2011 -0700
oe.types: for invalid type, list valid ones
Signed-off-by: Chris Larson <chris_larson at mentor.com>
---
lib/oe/types.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/lib/oe/types.py b/lib/oe/types.py
index 0fb91db..86de4b0 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
More information about the Openembedded-commits
mailing list