Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2012-07-08 13:27:33 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2012-07-08 13:27:33 +0400
commitd96275a5c344d82f2466b0a6f85d8ee716771179 (patch)
tree2184df7306e1c2e535ff37f33a0933938b3d8c7b /release/scripts/modules/bl_i18n_utils/utils.py
parentb91bc4f037b5c3ce69fef2d6187690ce05ffea62 (diff)
Some cleanup.
Also trying to make it usuable from other tools (imports become a bit tricky here :/ ).
Diffstat (limited to 'release/scripts/modules/bl_i18n_utils/utils.py')
-rw-r--r--release/scripts/modules/bl_i18n_utils/utils.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/release/scripts/modules/bl_i18n_utils/utils.py b/release/scripts/modules/bl_i18n_utils/utils.py
index dfed2088878..ebf0f994a7a 100644
--- a/release/scripts/modules/bl_i18n_utils/utils.py
+++ b/release/scripts/modules/bl_i18n_utils/utils.py
@@ -23,9 +23,8 @@
import os
import sys
import collections
-from codecs import open
-import settings
+from bl_i18n_utils import settings
COMMENT_PREFIX = settings.COMMENT_PREFIX
@@ -145,7 +144,7 @@ def parse_messages(fname):
clean_vars()
- with open(fname, 'r', "utf-8") as f:
+ with open(fname, 'r', encoding="utf-8") as f:
for line_nr, line in enumerate(f):
line = stripeol(line)
if line == "":
@@ -248,7 +247,7 @@ def write_messages(fname, messages, commented, fuzzy):
"returned values). commented and fuzzy are two sets containing msgid. " \
"Returns the number of written messages."
num = 0
- with open(fname, 'w', "utf-8") as f:
+ with open(fname, 'w', encoding="utf-8") as f:
for msgkey, val in messages.items():
msgctxt, msgid = msgkey
f.write("\n".join(val["comment_lines"]))