Fix error message printing in so-rule

This commit is contained in:
William Wernert
2022-01-26 16:04:45 -05:00
parent e303fb12cf
commit 4532de368a

View File

@@ -80,7 +80,10 @@ def find_minion_pillar() -> str:
print_err('Could not find manager-type pillar (eval, standalone, manager, managersearch, import). Are you running this script on the manager?')
sys.exit(3)
elif len(result) > 1:
res_str = ', '.join(f'\"{result}\"')
res_arr = []
for r in result:
res_arr.append(f'\"{r}\"')
res_str = ', '.join(res_arr)
print_err('(This should not happen, the system is in an error state if you see this message.)\n')
print_err('More than one manager-type pillar exists, minion id\'s listed below:')
print_err(f' {res_str}')