From 6d3ba96d484f9e19d4eb8647919ff57acf332a5f Mon Sep 17 00:00:00 2001 From: Niklas Nolte Date: Tue, 25 Jun 2019 17:14:04 +0200 Subject: [PATCH] use getGaudiType() now that its possible --- PyConf/python/PyConf/core.py | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/PyConf/python/PyConf/core.py b/PyConf/python/PyConf/core.py index 93a267866c..2fbe80f3b4 100644 --- a/PyConf/python/PyConf/core.py +++ b/PyConf/python/PyConf/core.py @@ -73,29 +73,11 @@ class force_location(str): def _is_configurable_algorithm(t): - from GaudiKernel.Configurable import ConfigurableAlgorithm - try: - return issubclass(t, ConfigurableAlgorithm) - except TypeError: - try: - return issubclass(t.__class__, ConfigurableAlgorithm) - except TypeError: - return False - # FIXME when https://gitlab.cern.ch/gaudi/Gaudi/merge_requests/929 is merged do this: - # return t.getGaudiType() == 'Algorithm' + return t.getGaudiType() == 'Algorithm' def _is_configurable_tool(t): - from GaudiKernel.Configurable import ConfigurableAlgTool - try: - return issubclass(t, ConfigurableAlgTool) - except TypeError: - try: - return issubclass(t.__class__, ConfigurableAlgTool) - except TypeError: - return False - # FIXME when https://gitlab.cern.ch/gaudi/Gaudi/merge_requests/929 is merged do this: - # return t.getGaudiType() == 'AlgTool' + return t.getGaudiType() == 'AlgTool' def _setupComponent(alg, -- GitLab