diff --git a/doc/python_api/rst/bge.logic.rst b/doc/python_api/rst/bge.logic.rst index 7c392901eec..798491b4710 100644 --- a/doc/python_api/rst/bge.logic.rst +++ b/doc/python_api/rst/bge.logic.rst @@ -220,8 +220,8 @@ General functions .. note:: This function is not effective immediately, the scene is queued - and added on the next logic cycle where it will be available - from `getSceneList` + and added on the next logic cycle where it will be available + from `getSceneList` :arg name: The name of the scene :type name: string diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index e6fd8dcb949..944f5aaf4c1 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -1076,17 +1076,25 @@ class WM_OT_addon_enable(bpy.types.Operator): bl_idname = "wm.addon_enable" bl_label = "Enable Add-On" - module = StringProperty(name="Module", description="Module name of the addon to enable") + module = StringProperty( + name="Module", + description="Module name of the addon to enable", + ) def execute(self, context): mod = addon_utils.enable(self.module) if mod: - # check if add-on is written for current blender version, or raise a warning info = addon_utils.module_bl_info(mod) - if info.get("blender", (0, 0, 0)) > bpy.app.version: - self.report("WARNING','This script was written for a newer version of Blender and might not function (correctly).\nThe script is enabled though.") + info_ver = info.get("blender", (0, 0, 0)) + + if info_ver > bpy.app.version: + self.report({'WARNING'}, ("This script was written Blender " + "version %d.%d.%d and might not " + "function (correctly).\n" + "The script is enabled though.") % + info_ver) return {'FINISHED'} else: return {'CANCELLED'}