From: Chen Qi Date: Fri, 1 Jun 2018 05:03:01 +0000 (+0800) Subject: oeqa/core/decorator/__init__.py: use 'cls' instead of 'obj' X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~17776 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e06e4c859e8be5225d80806a2ebe175f0b152fe1;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git oeqa/core/decorator/__init__.py: use 'cls' instead of 'obj' Use 'cls' instead of 'obj' to better reflect that registerDecorator actually serves as a class decorator. Signed-off-by: Chen Qi Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/core/decorator/__init__.py b/meta/lib/oeqa/core/decorator/__init__.py index 6ca0acf3531..14d7bfcd356 100644 --- a/meta/lib/oeqa/core/decorator/__init__.py +++ b/meta/lib/oeqa/core/decorator/__init__.py @@ -6,9 +6,9 @@ from abc import abstractmethod, ABCMeta decoratorClasses = set() -def registerDecorator(obj): - decoratorClasses.add(obj) - return obj +def registerDecorator(cls): + decoratorClasses.add(cls) + return cls class OETestDecorator(object, metaclass=ABCMeta): case = None # Reference of OETestCase decorated