aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/vk/tracking/db
diff options
context:
space:
mode:
Diffstat (limited to 'vk/tracking/db')
-rw-r--r--vk/tracking/db/io.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/vk/tracking/db/io.py b/vk/tracking/db/io.py
index 487a136..37d9c53 100644
--- a/vk/tracking/db/io.py
+++ b/vk/tracking/db/io.py
@@ -12,7 +12,15 @@ class FileWriterCSV:
self._fd = fd
self._writer = csv.writer(fd, lineterminator='\n')
+ @staticmethod
+ def _convert_row_old_python(row):
+ if isinstance(row, list) or isinstance(row, tuple):
+ return row
+ return list(row)
+
def write_row(self, row):
+ if sys.version_info < (3, 5):
+ row = self._convert_row_old_python(row)
self._writer.writerow(row)
self._fd.flush()