From: Chris Larson Date: Thu, 13 Jan 2011 15:42:01 +0000 (-0700) Subject: oe.types: allow specifying the number base for integer X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e6a8f0000fcceb7d3d3992a307323a4563ee8c2;p=openembedded.git oe.types: allow specifying the number base for integer Signed-off-by: Chris Larson --- diff --git a/lib/oe/_types.py b/lib/oe/_types.py index b36060ff47..b9eb2d2b86 100644 --- 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))