On Thu, May 23, 2013 at 11:45 AM, Ross Burton wrote:
> +def trim_version(version, num_parts=2):
> +"""
> +Return just the first of , split by periods. For
> +example, trim_version("1.2.3", 2) will return "1.2".
> +"""
> +if type(version) is not str:
> +raise TypeErro
Add a helper function that returns just the first of ,
split by periods. For example, trim_version("1.2.3", 2) will return "1.2".
This should help reduce the spread of numerous copies of this idea across
classes and recipes.
Signed-off-by: Ross Burton
---
meta/lib/oe/tests/test_utils.py | 2