From 7b809aefdae499a89ce7aa9f758efb2b56135ac4 Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Sat, 28 Feb 2009 09:18:53 +0000 Subject: [PATCH] DateParserDisplayTest.py is a debug tool but runs always, only run when debug svn: r12156 --- src/plugins/tool/DateParserDisplayTest.py | 35 ++++++++++++----------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/src/plugins/tool/DateParserDisplayTest.py b/src/plugins/tool/DateParserDisplayTest.py index 8d45a658d..00de508a2 100644 --- a/src/plugins/tool/DateParserDisplayTest.py +++ b/src/plugins/tool/DateParserDisplayTest.py @@ -229,20 +229,21 @@ class DateParserDisplayTest(Tool.Tool): # #------------------------------------------------------------------------- -pmgr = PluginManager.get_instance() -pmgr.register_tool( - name = 'test_for_date_parser_and_displayer', - category = Tool.TOOL_DEBUG, - tool_class = DateParserDisplayTest, - options_class = Tool.ToolOptions, - modes = PluginManager.TOOL_MODE_GUI | PluginManager.TOOL_MODE_CLI, - translated_name = _("Check Localized Date Displayer and Parser"), - status = _("Beta"), - author_name = "Martin Hawlisch", - author_email = "martin@hawlisch.de", - description = _("This test tool will create many people showing all" - " different date variants as birth. The death date is" - " created by parsing the result of the date displayer for" - " the birth date. This way you can ensure that dates" - " printed can be parsed back in correctly.") - ) +if __debug__: + pmgr = PluginManager.get_instance() + pmgr.register_tool( + name = 'test_for_date_parser_and_displayer', + category = Tool.TOOL_DEBUG, + tool_class = DateParserDisplayTest, + options_class = Tool.ToolOptions, + modes = PluginManager.TOOL_MODE_GUI | PluginManager.TOOL_MODE_CLI, + translated_name = _("Check Localized Date Displayer and Parser"), + status = _("Beta"), + author_name = "Martin Hawlisch", + author_email = "martin@hawlisch.de", + description = _("This test tool will create many people showing all" + " different date variants as birth. The death date is" + " created by parsing the result of the date displayer for" + " the birth date. This way you can ensure that dates" + " printed can be parsed back in correctly.") + )