Merge amd-staging into amd-master 20240801

Signed-off-by: Zhang Ava <niandong.zhang@amd.com>
Change-Id: I8c9b1a2805e83e5de5873ef8fafaf38143c2ebd8
This commit is contained in:
Zhang Ava
2024-08-02 13:12:38 +08:00
4 changed files with 92 additions and 4 deletions
+7 -1
View File
@@ -871,7 +871,13 @@ def printLog(device, metricName, value=None, extraSpace=False, useItalics=False)
try:
if extraSpace:
print('\n', end='')
print(logstr + '\n', end='')
# Handle non UTF-8 locale
try:
print(logstr + '\n', end='')
except UnicodeEncodeError:
print(logstr.encode('ascii', 'ignore').decode('ascii'))
sys.stdout.flush()
# when piped into programs like 'head' - print throws an error.
# silently ignore instead