mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-20 20:53:46 +00:00
config_tools: gracefully process board XMLs with non-standard info
Occasionally the regular expressions searching for manufacturer and product name of the target board fail to find a matching line in a given board XML, possibly because the board XML does not contain such info. This causes an alert to be raised while it does not impact the functionality of the configurator. This patch adds a check to suppress such alerts. Tracked-On: #6691 Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
parent
22a47fe795
commit
c4f46d9c28
@ -145,11 +145,11 @@ export default {
|
|||||||
let reg = /(?<=Manufacturer).+(?=\\n)/
|
let reg = /(?<=Manufacturer).+(?=\\n)/
|
||||||
let result = boardContent.match(/Manufacturer.+\n/gm)
|
let result = boardContent.match(/Manufacturer.+\n/gm)
|
||||||
console.log(result)
|
console.log(result)
|
||||||
if (result.length > 0) {
|
if (result && result.length > 0) {
|
||||||
this.currentBoardManu = result[0]
|
this.currentBoardManu = result[0]
|
||||||
}
|
}
|
||||||
var result_p = boardContent.match(/Product Name.+\n/gm)
|
var result_p = boardContent.match(/Product Name.+\n/gm)
|
||||||
if (result_p.length > 0) {
|
if (result_p && result_p.length > 0) {
|
||||||
this.CurrentBoardProd = result_p[0]
|
this.CurrentBoardProd = result_p[0]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user