Skip to content

Commit 096a223

Browse files
authored
Merge pull request #1 from tekktrik/bugfix/convert-to-string
Bug fix for error on using lists with numbers - Convert all entries to string for writerow
2 parents 0022f18 + 273946d commit 096a223

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

circuitpython_csv.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,9 @@ def writerow(self, seq: List[str]):
122122
:param seq: The list of values to write
123123
"""
124124

125+
str_seq = [str(entry) for entry in seq]
125126
doub_quote_seq = [
126-
entry.replace(self.quotechar, self.quotechar * 2) for entry in seq
127+
entry.replace(self.quotechar, self.quotechar * 2) for entry in str_seq
127128
]
128129
quoted_seq = [self._apply_quotes(entry) for entry in doub_quote_seq]
129130
parsed_str = (self.delimiter).join(quoted_seq)

0 commit comments

Comments
 (0)