Automation fix to handle Apply time for Master

Apply time changes is not merged. So, to handle this scenario changes are made.
e.g. { "HttpPushUriOptions": { "HttpPushUriApplyTime":{ "ApplyTime":"Policy"}}}
Policy: OnReset/Immediate

Reference  openbmc/openbmc-test-automation#1962

Change-Id: I2600c33b2a7ef9de2ef4294fe15abfa0010d3b48
Signed-off-by: Sushil Singh <susilsi7@in.ibm.com>
diff --git a/redfish/extended/redfish_bmc_code_update.robot b/redfish/extended/redfish_bmc_code_update.robot
index ce8dbb1..c067b4b 100644
--- a/redfish/extended/redfish_bmc_code_update.robot
+++ b/redfish/extended/redfish_bmc_code_update.robot
@@ -44,11 +44,9 @@
     [Documentation]  Do the suite setup.
 
     Redfish.Login
-
     # Delete BMC dump and Error logs.
     Delete All BMC Dump
     Redfish Purge Event Log
-
     # Checking for file existence.
     Valid File Path  IMAGE_FILE_PATH
 
@@ -128,8 +126,8 @@
     ${state}=  Get Pre Reboot State
     Rprint Vars  state
 
-    Set ApplyTime  policy=Immediate
+    Run Keyword And Ignore Error  Set ApplyTime  policy=OnReset
     Redfish Upload Image And Check Progress State
     Reboot BMC And Verify BMC Image
-    ...  Immediate  start_boot_seconds=${state['epoch_seconds']}
+    ...  OnReset  start_boot_seconds=${state['epoch_seconds']}