Skip to contentSkip to conversation

targetloader.py: drop test for ClassType

PATCH New Juro Bystricky 1 participant 1 message Dec 10, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 targetloader.py: drop test for ClassType

ClassType was removed from python3.
The code testing for ClassType kept throwing AttributeError exceptions:

module 'types' has no attribute 'ClassType'

The exceptions prevented loading of any dynamically resolved target controllers.

---
 meta/lib/oeqa/controllers/testtargetloader.py | 2 --
 1 file changed, 2 deletions(-)
meta/lib/oeqa/controllers/testtargetloader.py +0 -2
index a1b7b1d..b51d04b 100644
@@ -61,8 +61,6 @@ class TestTargetLoader:
             obj = getattr(module, target)
             if obj: 
                 from oeqa.targetcontrol import BaseTarget
-                if (not isinstance(obj, (type, types.ClassType))):
-                    bb.warn("Target {0} found, but not of type Class".format(target))
                 if( not issubclass(obj, BaseTarget)):
                     bb.warn("Target {0} found, but subclass is not BaseTarget".format(target))
         except:
Signature · 1 line
2.7.4