feat: add alma9 support and fix: rpm python3 compatibility

This commit is contained in:
jiangxianfu
2023-09-21 19:49:12 +08:00
committed by GitHub
parent 789419e6cf
commit 36a35f8512
2 changed files with 10 additions and 0 deletions

View File

@ -75,6 +75,12 @@ def shell_run_command(command_str, need_print_all=True, need_print_output=True,
if data == b'':
if ps.poll() is not None:
break
# fix: python2->python3 subprocess shell bug
# 2023/09/21 jiangxf
try:
data = data.decode()
except:
pass
result["return_message"].append(data)
if not need_print_all: