git.openpandora.org
/
openembedded.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
694a291
)
oe.types: allow specifying the number base for integer
author
Chris Larson
<chris_larson@mentor.com>
Thu, 13 Jan 2011 15:42:01 +0000
(08:42 -0700)
committer
Chris Larson
<chris_larson@mentor.com>
Thu, 13 Jan 2011 15:57:18 +0000
(08:57 -0700)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
lib/oe/_types.py
patch
|
blob
|
history
diff --git
a/lib/oe/_types.py
b/lib/oe/_types.py
index
b36060f
..
b9eb2d2
100644
(file)
--- a/
lib/oe/_types.py
+++ b/
lib/oe/_types.py
@@
-82,6
+82,10
@@
def boolean(value):
return False
raise ValueError("Invalid boolean value '%s'" % value)
-def integer(value):
- """OpenEmbedded 'integer' type"""
- return int(value)
+def integer(value, numberbase=10):
+ """OpenEmbedded 'integer' type
+
+ Defaults to base 10, but this can be specified using the optional
+ 'numberbase' flag."""
+
+ return int(value, int(numberbase))