Author: bugman Date: Fri Jul 4 16:58:41 2014 New Revision: 24460 URL: http://svn.gna.org/viewcvs/relax?rev=24460&view=rev Log: Merged revisions 24454 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r24454 | bugman | 2014-07-04 11:31:00 +0200 (Fri, 04 Jul 2014) | 6 lines Fix for the internal structural object MolContainer.last_residue() method. This can now operate when no structural information is present, returning 0 instead of resulting in an IndeError. ........ Modified: branches/frame_order_cleanup/ (props changed) branches/frame_order_cleanup/lib/structure/internal/molecules.py Propchange: branches/frame_order_cleanup/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Fri Jul 4 16:58:41 2014 @@ -1 +1 @@ -/trunk:1-24430 +/trunk:1-24459 Modified: branches/frame_order_cleanup/lib/structure/internal/molecules.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/lib/structure/internal/molecules.py?rev=24460&r1=24459&r2=24460&view=diff ============================================================================== --- branches/frame_order_cleanup/lib/structure/internal/molecules.py (original) +++ branches/frame_order_cleanup/lib/structure/internal/molecules.py Fri Jul 4 16:58:41 2014 @@ -487,6 +487,10 @@ @rtype: int """ + # No residues yet. + if not len(self.res_num): + return 0 + # Return the number. return self.res_num[-1]