[Bf-extensions-cvs] [5b02e6e1] master: ui_translate: make it resilient to ASAN errors at exit.
Bastien Montagne
noreply at git.blender.org
Wed Nov 8 10:34:35 CET 2017
Commit: 5b02e6e1acc4c3cf4822607ab33f48d7cffecbd3
Author: Bastien Montagne
Date: Wed Nov 8 10:33:03 2017 +0100
Branches: master
https://developer.blender.org/rBA5b02e6e1acc4c3cf4822607ab33f48d7cffecbd3
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!
===================================================================
M ui_translate/__init__.py
M ui_translate/update_svn.py
===================================================================
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'}
More information about the Bf-extensions-cvs
mailing list