From: W. Trevor King Date: Mon, 5 Jan 2009 16:08:52 +0000 (-0500) Subject: Protect against blank long-header line. X-Git-Tag: 0.4~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f9213bee2ae9841c01c1066f11911ab37df5b609;p=chemdb.git Protect against blank long-header line. --- 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 :