changeset 2525:e8e1507049b7

core: use C.bool to detect value of "handler" field in PLUGIN_INFO
author Goffi <goffi@goffi.org>
date Fri, 16 Mar 2018 17:00:57 +0100
parents e96076cdf74c
children 35d591086974
files src/core/sat_main.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/core/sat_main.py	Fri Mar 16 17:00:09 2018 +0100
+++ b/src/core/sat_main.py	Fri Mar 16 17:00:57 2018 +0100
@@ -269,7 +269,7 @@
             if optional:
                 return
             raise ImportError(u"Error during initiation")
-        if 'handler' in plugin_info and plugin_info['handler'] == 'yes':
+        if C.bool(plugin_info.get(C.PI_HANDLER, C.BOOL_FALSE)):
             self.plugins[import_name].is_handler = True
         else:
             self.plugins[import_name].is_handler = False