diff options
author | George Liu <liuxiwei@inspur.com> | 2020-09-08 08:39:16 +0300 |
---|---|---|
committer | Andrew Geissler <geissonator@yahoo.com> | 2020-09-10 00:49:57 +0300 |
commit | c2f79e4edf17cd0018a702a1f377c306e696e9e8 (patch) | |
tree | 28210d91ae91f507ddf8c97d41b01f1c1ae9e8ad /meta-inspur/meta-fp5280g2/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend | |
parent | b4cde45789822f3abad6581ada6c1ad1491c828b (diff) | |
download | openbmc-c2f79e4edf17cd0018a702a1f377c306e696e9e8.tar.xz |
fp5280g2: Fix parsing version_id format
Use the aux property directly in dev_id.json if the version_id property fails
to match the specified regex, and avoid list index out of range.
(From meta-inspur rev: 48e6171e36d479fa722b448fb4977bf1288ac7d9)
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I974005dc1a5e612dc53a8a70f67831927d2616d2
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'meta-inspur/meta-fp5280g2/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend')
-rw-r--r-- | meta-inspur/meta-fp5280g2/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/meta-inspur/meta-fp5280g2/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend b/meta-inspur/meta-fp5280g2/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend index 3256e834a..0eaffff37 100644 --- a/meta-inspur/meta-fp5280g2/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend +++ b/meta-inspur/meta-fp5280g2/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend @@ -25,6 +25,9 @@ python do_patch() { # count from the commit version count = re.findall("-(\d{1,4})-", version_id) + if not count: + return + release = re.findall("-r(\d{1,4})", version_id) if release: auxVer = count[0] + "{0:0>4}".format(release[0]) |