Add codecs.open instad of open (for DB fetcher on Win7)

This commit is contained in:
Jack Stdin 2017-01-25 12:05:29 +03:00
parent f2659b0010
commit 85e1ecfbaa

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import os import os
import codecs
from aore.config import Folders from aore.config import Folders
from aore.dbutils.dbschemas import db_shemas from aore.dbutils.dbschemas import db_shemas
from aore.miscutils.exceptions import FiasException from aore.miscutils.exceptions import FiasException
@ -38,7 +38,7 @@ class AoDataParser:
# Prepare to next iteration # Prepare to next iteration
self.counter = 0 self.counter = 0
self.currentpage += 1 self.currentpage += 1
self.csv_file = open(self.base_filename.format(self.currentpage), "w") self.csv_file = codecs.open(self.base_filename.format(self.currentpage), "w", "utf-8")
exit_nodes = list() exit_nodes = list()
for allowed_field in self.allowed_fields: for allowed_field in self.allowed_fields: