Merge "SWDEV-320429: wrapping the comma-containing names in the .csv in double quotes at the time the .csv is generated" into amd-staging

[ROCm/rocprofiler commit: 94004e592c]
Tá an tiomantas seo le fáil i:
Kiumars Sabeti údaraithe agus Gerrit Code Review tiomanta 2022-04-29 17:37:41 -04:00
2 tuismitheoirí 63964277e5 08c1267bbb
tiomantas 32684591d2
1 comhad athraithe
+5
+5
Féach ar an gComhad
@@ -129,6 +129,11 @@ class SQLiteDB:
with open(file_name, mode='w') as fd:
fd.write(','.join(fields) + '\n')
for raw in self._get_raws(table_name):
tmp = list(raw)
for idx in range(len(tmp)):
if type(tmp[idx]) == str:
if(not(tmp[idx][0] == tmp[idx][-1] == '"')): tmp[idx] = '"'+tmp[idx]+'"'
raw = tuple(tmp)
fd.write(reduce(lambda a, b: str(a) + ',' + str(b), raw) + '\n')
# dump JSON trace