mirror of
https://git.yoctoproject.org/poky
synced 2026-04-17 18:32:12 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
78d15a8015
commit
96631f080b
@@ -449,6 +449,16 @@ def boolean(input_str, name):
|
||||
return name
|
||||
|
||||
|
||||
def strip_base(input_str):
|
||||
"""
|
||||
strip '/base' off the end of input_str, so we can use 'base' in
|
||||
the branch names we present to the user.
|
||||
"""
|
||||
if input_str and input_str.endswith("/base"):
|
||||
return input_str[:-len("/base")]
|
||||
return input_str.strip()
|
||||
|
||||
|
||||
deferred_choices = {}
|
||||
|
||||
def gen_choices_defer(input_line, context, checklist = False):
|
||||
|
||||
Reference in New Issue
Block a user