diff options
author | Tom Zanussi <tom.zanussi@intel.com> | 2012-06-18 23:36:47 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-08-21 11:35:20 +0100 |
commit | 96631f080b6a2ef181486cc2e2c74514dd45c1f4 (patch) | |
tree | 80229685cc966121abdf1fc9059fdd473fa848f0 /scripts | |
parent | 78d15a8015bcc73ee7731cc7fc7ee086d2728139 (diff) | |
download | poky-96631f080b6a2ef181486cc2e2c74514dd45c1f4.tar.gz |
yocto-bsp: add new strip_base() function
Add a strip_base() function to remove '/base' from the branch names
presented to the user.
Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/bsp/engine.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/lib/bsp/engine.py b/scripts/lib/bsp/engine.py index 8e53f00bd2..cda1d148e7 100644 --- a/scripts/lib/bsp/engine.py +++ b/scripts/lib/bsp/engine.py | |||
@@ -449,6 +449,16 @@ def boolean(input_str, name): | |||
449 | return name | 449 | return name |
450 | 450 | ||
451 | 451 | ||
452 | def strip_base(input_str): | ||
453 | """ | ||
454 | strip '/base' off the end of input_str, so we can use 'base' in | ||
455 | the branch names we present to the user. | ||
456 | """ | ||
457 | if input_str and input_str.endswith("/base"): | ||
458 | return input_str[:-len("/base")] | ||
459 | return input_str.strip() | ||
460 | |||
461 | |||
452 | deferred_choices = {} | 462 | deferred_choices = {} |
453 | 463 | ||
454 | def gen_choices_defer(input_line, context, checklist = False): | 464 | def gen_choices_defer(input_line, context, checklist = False): |