Skip to content

Commit

Permalink
resolved added filters to not fetch unrelated data
Browse files Browse the repository at this point in the history
  • Loading branch information
kirankotari committed Jan 25, 2019
1 parent db5942f commit 4dfaa3d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion shconfparser/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ def _fetch_table_row(self, line, data, table):
def _fetch_table_data(self, lines, header_index):
table, data = [], {}
for i in range(header_index + 1, len(lines)):
if '#' in lines[i]:
if '#' in lines[i] or len(lines[i]) < 2:
break
if '---' in lines[i] or '===' in lines[i]:
continue
data = self._fetch_table_row(lines[i], data, table)
return table

Expand Down

0 comments on commit 4dfaa3d

Please sign in to comment.