Author: bugman Date: Fri Jun 1 08:17:46 2012 New Revision: 16579 URL: http://svn.gna.org/viewcvs/relax?rev=16579&view=rev Log: Second attempt at fixing the problem described at r16578. 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=16579&r1=16578&r2=16579&view=diff ============================================================================== --- branches/uf_redesign/user_functions/objects.py (original) +++ branches/uf_redesign/user_functions/objects.py Fri Jun 1 08:17:46 2012 @@ -109,7 +109,7 @@ """ # Create a new block if needed. - if len(self._types) and self._types[-1] != 'item list': + if not len(self._types) or 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 len(self._types) and self._types[-1] != 'list': + if not len(self._types) or self._types[-1] != 'list': self._data.append([text]) self._types.append('list') @@ -155,7 +155,7 @@ """ # Create a new block if needed. - if len(self._types) and self._types[-1] != 'prompt': + if not len(self._types) or self._types[-1] != 'prompt': self._data.append([text]) self._types.append('prompt') @@ -184,7 +184,7 @@ """ # Create a new table if needed. - if len(self._types) and self._types[-1] != 'table' or len(row) != len(self._data[-1][-1]): + if not len(self._types) or self._types[-1] != 'table' or len(row) != len(self._data[-1][-1]): self._data.append([row]) self._types.append('table')