Author: bugman Date: Tue Feb 27 07:04:14 2007 New Revision: 3054 URL: http://svn.gna.org/viewcvs/relax?rev=3054&view=rev Log: Recreated the AllRelaxErrors object! Modified: branches/error_import/relax_errors.py Modified: branches/error_import/relax_errors.py URL: http://svn.gna.org/viewcvs/relax/branches/error_import/relax_errors.py?rev=3054&r1=3053&r2=3054&view=diff ============================================================================== --- branches/error_import/relax_errors.py (original) +++ branches/error_import/relax_errors.py Tue Feb 27 07:04:14 2007 @@ -20,8 +20,9 @@ # # ############################################################################### +from re import match import time - +from types import ClassType # Global variables. relax = None @@ -648,3 +649,23 @@ self.text = "The invalid " + name + " floating point value of NaN (Not a Number) has occurred." if Debug: self.save_state() + + + +# An object of all the RelaxErrors. +################################### + +# Loop over all objects of this module. +for name in dir(): + # Get the object. + object = globals()[name] + + # Skip over all non error class objects. + if type(object) != ClassType or not match('Relax', name): + continue + + # Tuple of all the errors. + if 'AllRelaxErrors' in dir(): + AllRelaxErrors = AllRelaxErrors, object + else: + AllRelaxErrors = object,