mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-21 06:41:00 +00:00
Remove CSVLogger.encode_row_s()
Introduced during Python 3 conversion to maintaint Python 2 support:
55a7973b ("Python3: fix csvlog", 2016-12-04)
This commit is contained in:
parent
ed13a926d3
commit
2c2e7e55ac
1 changed files with 1 additions and 7 deletions
|
|
@ -119,15 +119,9 @@ class CSVLogger (_Logger):
|
|||
self.writerow(map(strformat.unicode_safe, row))
|
||||
self.flush()
|
||||
|
||||
def encode_row_s(self, row_s):
|
||||
if isinstance(row_s, str):
|
||||
return row_s # Python 3
|
||||
else:
|
||||
return row_s.encode("utf-8", self.codec_errors) # Python 2
|
||||
|
||||
def writerow (self, row):
|
||||
"""Write one row in CSV format."""
|
||||
self.writer.writerow([self.encode_row_s(s) for s in row])
|
||||
self.writer.writerow(row)
|
||||
# Fetch UTF-8 output from the queue ...
|
||||
data = self.queue.getvalue()
|
||||
try:
|
||||
|
|
|
|||
Loading…
Reference in a new issue