Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/core/src/package_managers/YumPackageManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,14 @@ def do_processes_require_restart(self):
self.composite_logger.log_debug(" - Inapplicable line: " + str(line))
continue
else:
# The first string should be process ID and hence it should be integer.
# If first string is not process ID then the line is not for a process detail.
try:
int(process_details[0])
except Exception:
self.composite_logger.log_debug(" - Inapplicable line: " + str(line))
continue

self.composite_logger.log_debug(" - Applicable line: " + str(line))
process_count += 1
process_list_verbose += process_details[1] + " (" + process_details[0] + "), " # process name and id
Expand Down
9 changes: 9 additions & 0 deletions src/core/tests/library/LegacyEnvLayerExtensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,15 @@ def run_command_output(self, cmd, no_output=False, chk_err=True):
output = "Loaded plugins: langpacks, product-id, search-disabled-repos" + \
"No package microcode_ctl-2:2.1-29.16.el7_5 available." + \
"Error: Nothing to do"
elif cmd.find("sudo yum ps") > -1:
code = 0
output = "Loaded plugins: enabled_repos_upload, package_upload, product-id, ps, search-\n" + \
" : disabled-repos, subscription-manager\n" + \
"This system is not registered with an entitlement server. You can use subscription-manager to register.\n" + \
" pid proc CPU RSS State uptime\n" + \
"ps\n" + \
"Uploading Enabled Repositories Report\n" + \
"Cannot upload enabled repos report, is this client registered?"
else:
code = 0
output = ''
Expand Down