Verify PNOR Update: fix None pflash_cmd value
Fixed an error where pflash_cmd value is set to None if pflash doesn't
support skip parm.
Change-Id: I45821d894daaf460e0e944bf1065c65645159769
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/utils.robot b/lib/utils.robot
index a0c56b8..852989d 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -83,9 +83,10 @@
# Error 100 opening ffs !
${stdout} ${stderr} ${rc}=
- ... BMC Execute Command /usr/sbin/pflash -h | egrep skip ignore_err=${1}
- ${pflash_cmd}= Run Keyword if ${rc} == ${0}
- ... Catenate SEPARATOR= ${pflash_cmd} --skip=4096
+ ... BMC Execute Command /usr/sbin/pflash -h | egrep -q skip
+ ... ignore_err=${1}
+ ${pflash_cmd}= Set Variable If ${rc} == ${0} ${pflash_cmd} --skip=4096
+ ... ${pflash_cmd}
${pnor_info}= BMC Execute Command ${pflash_cmd}
Should Not Contain Any ${pnor_info} Flash header not found Error