Skip to content

Commit

Permalink
CSV: disable progress calculation when it should
Browse files Browse the repository at this point in the history
  • Loading branch information
ilius committed Nov 1, 2024
1 parent 0329831 commit 7a4f3e7
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions pyglossary/plugins/csv_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,14 @@ def open(
),
)

if cfile.seekable():
cfile.seek(0, 2)
self._fileSize = cfile.tell()
cfile.seek(0)
# self._glos.setInfo("input_file_size", f"{self._fileSize}")
else:
log.warning("CSV Reader: file is not seekable")
if self._glos.progressbar:
if cfile.seekable():
cfile.seek(0, 2)
self._fileSize = cfile.tell()
cfile.seek(0)
# self._glos.setInfo("input_file_size", f"{self._fileSize}")
else:
log.warning("CSV Reader: file is not seekable")

self._file = TextFilePosWrapper(cfile, self._encoding)
self._csvReader = csv.reader(
Expand Down

0 comments on commit 7a4f3e7

Please sign in to comment.