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]
Šī revīzija ir iekļauta:
Kiumars Sabeti
2022-04-29 17:37:41 -04:00
revīziju iesūtīja Gerrit Code Review
revīzija 32684591d2
@@ -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