Update sandbox/grist/imports/import_csv.py

Co-authored-by: Alex Hall <alex.mojaki@gmail.com>
This commit is contained in:
Yohan Boniface 2022-09-20 17:34:59 +02:00 committed by GitHub
parent ce31d1632d
commit 045227cb52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -107,7 +107,7 @@ def _guess_dialect(file_obj):
try:
# Restrict allowed delimiters to prevent guessing other char than this list.
dialect = csv.Sniffer().sniff(file_obj.read(100000), delimiters=['\t', ',', ';', '|'])
log.info("Guessed dialect %s" % dict(dialect.__dict__))
log.info("Guessed dialect %s", dict(dialect.__dict__))
# Mimic messytables default for now.
dialect.lineterminator = "\n"
dialect.doublequote = True