Skip to content

Commit f547e72

Browse files
committed
bpo-32255: Fix inconsistent behavior when csv.writer writes None
1 parent 11cc289 commit f547e72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/_csv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,7 @@ csv_writerow(WriterObj *self, PyObject *seq)
12381238
if (PyErr_Occurred())
12391239
return NULL;
12401240

1241-
if (self->num_fields > 0 && self->rec_size == 0) {
1241+
if (self->num_fields > 0 && self->rec_len == 0) {
12421242
if (dialect->quoting == QUOTE_NONE) {
12431243
PyErr_Format(_csvstate_global->error_obj,
12441244
"single empty field record must be quoted");

0 commit comments

Comments
 (0)