From f9213bee2ae9841c01c1066f11911ab37df5b609 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 5 Jan 2009 11:08:52 -0500 Subject: [PATCH] Protect against blank long-header line. --- text_db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text_db.py b/text_db.py index 0d0bf72..eca4740 100644 --- a/text_db.py +++ b/text_db.py @@ -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 : -- 2.26.2