From: Thierry Parmentelat Date: Thu, 27 Jun 2013 19:24:30 +0000 (+0200) Subject: second pass of cleanup for omf aspects X-Git-Tag: plcapi-5.2-6~1 X-Git-Url: http://git.onelab.eu/?p=plcapi.git;a=commitdiff_plain;h=1deed70157a086bf799847cfb4fc50ec3ae15c51 second pass of cleanup for omf aspects --- diff --git a/PLC/API.py b/PLC/API.py index 201de2d..829e759 100644 --- a/PLC/API.py +++ b/PLC/API.py @@ -145,12 +145,6 @@ class PLCAPI: # Aspects modify the API by injecting code before, after or # around method calls. -- http://github.com/baris/pyaspects/blob/master/README # - # As of now we only have aspects for OMF integration, that's - # why we enable aspects only if PLC_OMF is set to true. - if self.config.PLC_OMF_ENABLED: - from aspects import apply_omf_aspect - apply_omf_aspect() - if self.config.PLC_RATELIMIT_ENABLED: from aspects import apply_ratelimit_aspect apply_ratelimit_aspect() diff --git a/aspects/__init__.py b/aspects/__init__.py index aa7b05c..41cbe77 100644 --- a/aspects/__init__.py +++ b/aspects/__init__.py @@ -1,13 +1,8 @@ from pyaspects.weaver import weave_class_method from PLC.Method import Method -from aspects.omfaspects import OMFAspect from aspects.ratelimitaspects import RateLimitAspect -def apply_omf_aspect(): - # track all PLC methods to add OMF hooks - weave_class_method(OMFAspect(), Method, "__call__") - def apply_ratelimit_aspect(): weave_class_method(RateLimitAspect(), Method, "__call__")