mailr18480 - /trunk/generic_fns/structure/api_base.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on February 18, 2013 - 17:51:
Author: bugman
Date: Mon Feb 18 17:51:51 2013
New Revision: 18480

URL: http://svn.gna.org/viewcvs/relax?rev=18480&view=rev
Log:
The structural API num_molecules() method can now handle no data being 
present.


Modified:
    trunk/generic_fns/structure/api_base.py

Modified: trunk/generic_fns/structure/api_base.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/generic_fns/structure/api_base.py?rev=18480&r1=18479&r2=18480&view=diff
==============================================================================
--- trunk/generic_fns/structure/api_base.py (original)
+++ trunk/generic_fns/structure/api_base.py Mon Feb 18 17:51:51 2013
@@ -466,6 +466,10 @@
         @rtype:     int
         """
 
+        # No data.
+        if self.empty():
+            return 0
+
         # Validate the structural object.
         self.validate()
 




Related Messages


Powered by MHonArc, Updated Mon Feb 18 18:00:01 2013