Author: bugman Date: Mon Sep 2 11:15:53 2013 New Revision: 20737 URL: http://svn.gna.org/viewcvs/relax?rev=20737&view=rev Log: The isInf() and isNan() functions of lib.float can now handle values of None. If None is encountered, the functions simply return False. Modified: trunk/lib/float.py Modified: trunk/lib/float.py URL: http://svn.gna.org/viewcvs/relax/trunk/lib/float.py?rev=20737&r1=20736&r2=20737&view=diff ============================================================================== --- trunk/lib/float.py (original) +++ trunk/lib/float.py Mon Sep 2 11:15:53 2013 @@ -568,6 +568,10 @@ @raise TypeError: If obj isn't a python float. """ + # Catch None. + if obj == None: + return False + # bad result for code checking result = None @@ -603,6 +607,10 @@ @rtype: bool @raise TypeError: If obj isn't a python float. """ + + # Catch None. + if obj == None: + return False # bad result for code checking result = None