mailr16578 - /branches/uf_redesign/user_functions/objects.py


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

Header


Content

Posted by edward on June 01, 2012 - 08:15:
Author: bugman
Date: Fri Jun  1 08:15:52 2012
New Revision: 16578

URL: http://svn.gna.org/viewcvs/relax?rev=16578&view=rev
Log:
Bug fix for the Desc_container.add_*() methods - the lists, prompts, and 
tables sometimes fail.

If there is no text in front of these elements, the checks fail.


Modified:
    branches/uf_redesign/user_functions/objects.py

Modified: branches/uf_redesign/user_functions/objects.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/user_functions/objects.py?rev=16578&r1=16577&r2=16578&view=diff
==============================================================================
--- branches/uf_redesign/user_functions/objects.py (original)
+++ branches/uf_redesign/user_functions/objects.py Fri Jun  1 08:15:52 2012
@@ -109,7 +109,7 @@
         """
 
         # Create a new block if needed.
-        if self._types[-1] != 'item list':
+        if len(self._types) and self._types[-1] != 'item list':
             self._data.append([[item, text]])
             self._types.append('item list')
 
@@ -126,7 +126,7 @@
         """
 
         # Create a new block if needed.
-        if self._types[-1] != 'list':
+        if len(self._types) and self._types[-1] != 'list':
             self._data.append([text])
             self._types.append('list')
 
@@ -155,7 +155,7 @@
         """
 
         # Create a new block if needed.
-        if self._types[-1] != 'prompt':
+        if len(self._types) and self._types[-1] != 'prompt':
             self._data.append([text])
             self._types.append('prompt')
 
@@ -184,7 +184,7 @@
         """
 
         # Create a new table if needed.
-        if self._types[-1] != 'table' or len(row) != len(self._data[-1][-1]):
+        if len(self._types) and self._types[-1] != 'table' or len(row) != 
len(self._data[-1][-1]):
             self._data.append([row])
             self._types.append('table')
 




Related Messages


Powered by MHonArc, Updated Fri Jun 01 08:20:02 2012