|
@@ -1,3 +1,4 @@
|
|
|
|
+import io # fixme: remove explicit io imports after going py3k-only
|
|
import os
|
|
import os
|
|
import shutil
|
|
import shutil
|
|
|
|
|
|
@@ -77,7 +78,7 @@ class DataArchive(object):
|
|
clean_filename = slugify(str(name))
|
|
clean_filename = slugify(str(name))
|
|
file_dir_path = self.make_final_path(date=date, directory=directory)
|
|
file_dir_path = self.make_final_path(date=date, directory=directory)
|
|
file_path = os.path.join(file_dir_path, '{}.txt'.format(clean_filename))
|
|
file_path = os.path.join(file_dir_path, '{}.txt'.format(clean_filename))
|
|
- with open(file_path, 'w+') as fp:
|
|
|
|
|
|
+ with io.open(file_path, 'w', encoding='utf-8') as fp:
|
|
fp.write(six.text_type(value))
|
|
fp.write(six.text_type(value))
|
|
return file_path
|
|
return file_path
|
|
|
|
|