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)
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits