[accerciser] Fix for bug 709122 - Do not wrap __class__ object from plugins' methods



commit dcf6c9ae5642cb6f7aa2de0c0cf4b097841ed312
Author: Javier Hernández <jhernandez emergya com>
Date:   Mon Feb 17 17:56:28 2014 +0100

    Fix for bug 709122 - Do not wrap __class__ object from plugins' methods
    
    This is a temporary solution of this bug. In a mid-term we would like
    to move the plugins' architecture to use a composite with a proxy like
    accessor to wrap callable objects from the plugins as it was suggested
    in https://bugzilla.gnome.org/show_bug.cgi?id=723081#c4

 src/lib/accerciser/plugin/base_plugin.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/lib/accerciser/plugin/base_plugin.py b/src/lib/accerciser/plugin/base_plugin.py
index ed47ef5..50cf1fc 100644
--- a/src/lib/accerciser/plugin/base_plugin.py
+++ b/src/lib/accerciser/plugin/base_plugin.py
@@ -121,7 +121,7 @@ class Plugin(Tools):
     @rtype: object
     '''
     obj = super(Plugin, self).__getattribute__(name)
-    if callable(obj):
+    if callable(obj) and name not in ['__class__']:
       method_wrapper = \
           super(Plugin, self).__getattribute__('_PluginMethodWrapper')
       return method_wrapper(obj)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]