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

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2017-11-08 12:33:03 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-01-01 18:24:52 +0300
commit24e996af9afdfe888bfc4ff939f225f934deed6b (patch)
tree22e2a624acba9036bd9cd57c5bb1d4f507d7ddd3
parent995c808f1ca4c29648101d08ea7f9261cb667ff4 (diff)
ui_translate: make it resilient to ASAN errors at exit.
We do want to catch actual errors from message extraction process, but not dummy ASAN complaining about memleaks!
-rw-r--r--ui_translate/__init__.py4
-rw-r--r--ui_translate/update_svn.py5
2 files changed, 6 insertions, 3 deletions
diff --git a/ui_translate/__init__.py b/ui_translate/__init__.py
index 23f03d43..5ac0db95 100644
--- a/ui_translate/__init__.py
+++ b/ui_translate/__init__.py
@@ -21,8 +21,8 @@
bl_info = {
"name": "Manage UI translations",
"author": "Bastien Montagne",
- "version": (1, 1, 3),
- "blender": (2, 75, 0),
+ "version": (1, 1, 4),
+ "blender": (2, 79, 0),
"location": "Main \"File\" menu, text editor, any UI control",
"description": "Allow to manage UI translations directly from Blender "
"(update main po files, update scripts' translations, etc.)",
diff --git a/ui_translate/update_svn.py b/ui_translate/update_svn.py
index 5cac2996..81435046 100644
--- a/ui_translate/update_svn.py
+++ b/ui_translate/update_svn.py
@@ -63,6 +63,8 @@ class UI_OT_i18n_updatetranslation_svn_branches(bpy.types.Operator):
context.window_manager.progress_begin(0, len(i18n_sett.langs) + 1)
context.window_manager.progress_update(0)
if not self.use_skip_pot_gen:
+ env = os.environ.copy()
+ env["ASAN_OPTIONS"] = "exitcode=0"
# Generate base pot from RNA messages (we use another blender instance here, to be able to perfectly
# control our environment (factory startup, specific addons enabled/disabled...)).
# However, we need to export current user settings about this addon!
@@ -79,7 +81,8 @@ class UI_OT_i18n_updatetranslation_svn_branches(bpy.types.Operator):
# Not working (UI is not refreshed...).
#self.report({'INFO'}, "Extracting messages, this will take some time...")
context.window_manager.progress_update(1)
- if subprocess.call(cmmd):
+ ret = subprocess.run(cmmd, env=env)
+ if ret.returncode != 0:
self.report({'ERROR'}, "Message extraction process failed!")
context.window_manager.progress_end()
return {'CANCELLED'}