Revision: 819595e1e3ed
Author:   Janne Härkönen <[email protected]>
Date:     Tue Nov 29 01:52:45 2011
Log:      parsing.settings: Fix comment when empty string
http://code.google.com/p/robotframework/source/detail?r=819595e1e3ed

Modified:
 /src/robot/parsing/settings.py

=======================================
--- /src/robot/parsing/settings.py      Tue Oct 18 03:27:19 2011
+++ /src/robot/parsing/settings.py      Tue Nov 29 01:52:45 2011
@@ -262,6 +262,9 @@
         return len(self._comment)

     def as_list(self):
-        if self._comment and self._comment[0][0] != '#':
+        if self._has_comment():
             self._comment[0] = '# ' + self._comment[0]
         return self._comment
+
+    def _has_comment(self):
+ return self._comment and self._comment[0] and self._comment[0][0] != '#'

Reply via email to