Author: bugman Date: Tue Feb 27 06:41:10 2007 New Revision: 3051 URL: http://svn.gna.org/viewcvs/relax?rev=3051&view=rev Log: Bug fix. A small rearrangment of the RelaxWarning module was required. Modified: branches/error_import/relax_warnings.py Modified: branches/error_import/relax_warnings.py URL: http://svn.gna.org/viewcvs/relax/branches/error_import/relax_warnings.py?rev=3051&r1=3050&r2=3051&view=diff ============================================================================== --- branches/error_import/relax_warnings.py (original) +++ branches/error_import/relax_warnings.py Tue Feb 27 06:41:10 2007 @@ -30,16 +30,6 @@ relax = None Debug = False Pedantic = False - - -# Format warning messages. -warnings.formatwarning = format - -# Set warning filters. -if Pedantic: - warnings.filterwarnings('error', category=BaseWarning) -else: - warnings.filterwarnings('always', category=BaseWarning) # The warning formatting function. @@ -107,3 +97,16 @@ class RelaxNoPDBFileWarning(BaseWarning): def __init__(self, file): self.text = "The PDB file %s cannot be found, no structures will be loaded." % file + + + +# Format warning messages. +warnings.formatwarning = format + +# Set warning filters. +if Pedantic: + warnings.filterwarnings('error', category=BaseWarning) +else: + warnings.filterwarnings('always', category=BaseWarning) + +