mailr26058 - /trunk/lib/checks.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on September 26, 2014 - 14:38:
Author: bugman
Date: Fri Sep 26 14:38:48 2014
New Revision: 26058

URL: http://svn.gna.org/viewcvs/relax?rev=26058&view=rev
Log:
Fixes for the lib.checks.Check object.

The __call__() method keyword arguments **kargs needs to be processed inside 
the method to strip out
the escalate argument.


Modified:
    trunk/lib/checks.py

Modified: trunk/lib/checks.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/checks.py?rev=26058&r1=26057&r2=26058&view=diff
==============================================================================
--- trunk/lib/checks.py (original)
+++ trunk/lib/checks.py Fri Sep 26 14:38:48 2014
@@ -46,7 +46,7 @@
         self.checks = MethodType(function, self, Check)
 
 
-    def __call__(self, escalate=0, *args, **kargs):
+    def __call__(self, *args, **kargs):
         """Make the object callable, and perform the checks.
 
         This will call the function used to initialise the class and then
@@ -58,6 +58,13 @@
         @return:                True if the check passes, False otherwise.
         @rtype:                 bool
         """
+
+        # Remove the escalate keyword argument.
+        if 'escalate' not in kargs:
+            escalate = 0
+        else:
+            escalate = kargs['escalate']
+            del kargs['escalate']
 
         # Perform the check.
         error = self.checks(*args, **kargs)




Related Messages


Powered by MHonArc, Updated Fri Sep 26 15:00:02 2014