Author: bugman Date: Thu Jan 24 11:22:02 2013 New Revision: 18293 URL: http://svn.gna.org/viewcvs/relax?rev=18293&view=rev Log: Modified the RelaxNoRDCError and RelaxNoPCSError to accept no alignment ID. This is then used to indicate the complete absence of data. Modified: trunk/relax_errors.py Modified: trunk/relax_errors.py URL: http://svn.gna.org/viewcvs/relax/trunk/relax_errors.py?rev=18293&r1=18292&r2=18293&view=diff ============================================================================== --- trunk/relax_errors.py (original) +++ trunk/relax_errors.py Thu Jan 24 11:22:02 2013 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2003-2012 Edward d'Auvergne # +# Copyright (C) 2003-2013 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -768,8 +768,11 @@ # No RDC data. class RelaxNoRDCError(BaseError): - def __init__(self, id): - self.text = "RDC data corresponding to the identification string " + repr(id) + " does not exist." + def __init__(self, id=None): + if id: + self.text = "RDC data corresponding to the identification string " + repr(id) + " does not exist." + else: + self.text = "No RDC data exists." # RDC data already exists. class RelaxRDCError(BaseError): @@ -778,8 +781,11 @@ # No PCS data. class RelaxNoPCSError(BaseError): - def __init__(self, id): - self.text = "PCS data corresponding to the identification string " + repr(id) + " does not exist." + def __init__(self, id=None): + if id: + self.text = "PCS data corresponding to the identification string " + repr(id) + " does not exist." + else: + self.text = "No PCS data exists." # PCS data already exists. class RelaxPCSError(BaseError):