@@ -100,7 +100,7 @@ def start_installation(self, simulate=False):
100100 #todo: temp fix to test auto patching, this will be reset to using the maintenanceRunId string as is, once the corresponding changes in RSM are made
101101 # patch_version = str(self.execution_config.maintenance_run_id)
102102 patch_version = datetime .datetime .strptime (self .execution_config .maintenance_run_id .split (" " )[0 ], "%m/%d/%Y" ).strftime ('%Y.%m.%d' )
103- self .status_handler .set_patch_metadata_for_healthstore_substatus_json (patch_version = patch_version if patch_version is not None and patch_version is not "" else Constants .PATCH_VERSION_UNKNOWN ,
103+ self .status_handler .set_patch_metadata_for_healthstore_substatus_json (patch_version = patch_version if patch_version is not None and patch_version != "" else Constants .PATCH_VERSION_UNKNOWN ,
104104 report_to_healthstore = True ,
105105 wait_after_update = False )
106106 except ValueError as e :
@@ -209,11 +209,11 @@ def install_updates(self, maintenance_window, package_manager, simulate=False):
209209 self .status_handler .set_reboot_pending (self .is_reboot_pending ())
210210
211211 if install_result == Constants .FAILED :
212- self .status_handler .set_package_install_status (package_manager .get_product_name (package_and_dependencies [0 ]), package_and_dependency_versions [0 ], Constants .FAILED )
212+ self .status_handler .set_package_install_status (package_manager .get_product_name (str ( package_and_dependencies [0 ])), str ( package_and_dependency_versions [0 ]) , Constants .FAILED )
213213 failed_parent_update_count += 1
214214 patch_installation_successful = False
215215 elif install_result == Constants .INSTALLED :
216- self .status_handler .set_package_install_status (package_manager .get_product_name (package_and_dependencies [0 ]), package_and_dependency_versions [0 ], Constants .INSTALLED )
216+ self .status_handler .set_package_install_status (package_manager .get_product_name (str ( package_and_dependencies [0 ])), str ( package_and_dependency_versions [0 ]) , Constants .INSTALLED )
217217 successful_parent_update_count += 1
218218 if package in self .last_still_needed_packages :
219219 index = self .last_still_needed_packages .index (package )
@@ -229,7 +229,7 @@ def install_updates(self, maintenance_window, package_manager, simulate=False):
229229
230230 if package_manager .is_package_version_installed (dependency , dependency_version ):
231231 self .composite_logger .log_debug (" - Marking dependency as succeeded: " + str (dependency ) + "(" + str (dependency_version ) + ")" )
232- self .status_handler .set_package_install_status (package_manager .get_product_name (str (dependency )), dependency_version , Constants .INSTALLED )
232+ self .status_handler .set_package_install_status (package_manager .get_product_name (str (dependency )), str ( dependency_version ) , Constants .INSTALLED )
233233 index = self .last_still_needed_packages .index (dependency )
234234 self .last_still_needed_packages .pop (index )
235235 self .last_still_needed_package_versions .pop (index )
0 commit comments