Commits

Daniel Blankenberg committed ffda4e6

Fix for table reader returning comments for blank lines when return_comments is False.

Comments (0)

Files changed (1)

lib/bx/tabular/io.py

         # Catch blank lines (throw a warning?)
         # This will end up adding a '#' at the beginning of blank lines
         if line == '':
-            return Comment( line )
+            if self.return_comments:
+                return Comment( line )
+            else:
+                return self.next()
         # Is it a comment line?
         for comment_line_start in self.comment_lines_startswith:
             if line.startswith( comment_line_start ):