Protect against blank long-header line.
authorW. Trevor King <wking@drexel.edu>
Mon, 5 Jan 2009 16:08:52 +0000 (11:08 -0500)
committerW. Trevor King <wking@drexel.edu>
Mon, 5 Jan 2009 16:08:52 +0000 (11:08 -0500)
text_db.py

index 0d0bf7299841cc72d8e8e4b5a21a2c8106c69bee..eca4740ed3bb23b94666f93780059a179e49169a 100644 (file)
@@ -168,7 +168,7 @@ class text_db (object) :
         if len(reclines) == 1 :
             return # Only a header
         # check for a long-header line
-        if reclines[1][0] == self.COM_CHAR :
+        if len(reclines[1]) > 0 and reclines[1][0] == self.COM_CHAR :
             self._long_header = self._get_header(reclines[1])
             startline = 2
         else :