Author: bugman Date: Sun Sep 14 12:58:39 2014 New Revision: 25821 URL: http://svn.gna.org/viewcvs/relax?rev=25821&view=rev Log: Fixes for the new check_domain() and check_model() frame order functions. Modified: branches/frame_order_cleanup/specific_analyses/frame_order/checks.py Modified: branches/frame_order_cleanup/specific_analyses/frame_order/checks.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/specific_analyses/frame_order/checks.py?rev=25821&r1=25820&r2=25821&view=diff ============================================================================== --- branches/frame_order_cleanup/specific_analyses/frame_order/checks.py (original) +++ branches/frame_order_cleanup/specific_analyses/frame_order/checks.py Sun Sep 14 12:58:39 2014 @@ -45,6 +45,7 @@ # Init. defined = True + msg = '' # Check that the domain is defined. if not hasattr(cdp, 'domain'): @@ -55,9 +56,9 @@ msg = "The domain '%s' has not been defined. Please use the domain user function." % domain # Warnings and errors. - if escalate == 1: + if not defined and escalate == 1: warn(RelaxWarning(msg)) - elif escalate == 2: + elif not defined and escalate == 2: raise RelaxError(msg) # Return the answer. @@ -76,6 +77,7 @@ # Init. flag = True + msg = '' # Check that the model is set up. if not hasattr(cdp, 'model'): @@ -83,9 +85,9 @@ msg = "The frame order model has not been set up, please use the frame_order.select_model user function." # Warnings and errors. - if escalate == 1: + if not flag and escalate == 1: warn(RelaxWarning(msg)) - elif escalate == 2: + elif not flag and escalate == 2: raise RelaxError(msg) # Return the answer.