Revision: 3604
Author: pekka.klarck
Date: Thu May 27 23:15:11 2010
Log: inspect.isroutime is true also for 'wrapper_descriptors'. it is safe to use only ismethod here because creating __init__ as a function isn't possible
http://code.google.com/p/robotframework/source/detail?r=3604

Modified:
 /trunk/src/robot/running/testlibraries.py

=======================================
--- /trunk/src/robot/running/testlibraries.py   Thu May 27 11:20:09 2010
+++ /trunk/src/robot/running/testlibraries.py   Thu May 27 23:15:11 2010
@@ -108,9 +108,9 @@
         return InitHandler(self, init_method)

     def _valid_init(self, init_method):
- if utils.is_jython and isinstance(init_method, PyReflectedConstructor):
+        if inspect.ismethod(init_method):
             return True
-        if inspect.isroutine(init_method):
+ if utils.is_jython and isinstance(init_method, PyReflectedConstructor):
             return True
         return False

Reply via email to