Author: tack
Date: Mon Jun 25 18:25:59 2007
New Revision: 2732

Modified:
   trunk/base/src/config.py

Log:
Bug fix.


Modified: trunk/base/src/config.py
==============================================================================
--- trunk/base/src/config.py    (original)
+++ trunk/base/src/config.py    Mon Jun 25 18:25:59 2007
@@ -389,7 +389,7 @@
             var_strings.append((cfgstr, var_is_group))
 
         for (cfgstr, var_is_group) in var_strings:
-            if var_is_group and ret[-1][-1] != '\n':
+            if var_is_group and (not ret or not ret[-1].endswith('\n')):
                 # Config item is a group or list, space it down with a blank
                 # line for readability.
                 ret.append('')
@@ -400,7 +400,7 @@
                 ret.append('#')
 
         if print_desc and self._name and not is_anonymous:
-            if n_nongroup != len(self._vars) and ret[-1][-1] != '\n':
+            if n_nongroup != len(self._vars) and (not ret or not 
ret[-1].endswith('\n')):
                 # One of our variables is a group/dict, so add another
                 # empty line to separate the stanza.
                 ret.append('\n#')
@@ -533,7 +533,7 @@
                 space_vars = True
 
         for cfgstr in var_strings:
-            if '# Begin' in cfgstr and ret[-1][-1] != '\n':
+            if '# Begin' in cfgstr and (not ret or not ret[-1].endswith('\n')):
                 # Config item is a group or list, space it down with a blank
                 # line for readability.
                 ret.append('')

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to