Changed slightly to use nonCommentNonEmptyLines.

This commit is contained in:
Jeremy Fincher 2004-01-11 14:38:11 +00:00
parent 992781c908
commit 65b139dda9
1 changed files with 1 additions and 3 deletions

View File

@ -162,10 +162,8 @@ class Lookup(callbacks.Privmsg):
except sqlite.DatabaseError:
cursor.execute("CREATE TABLE %s (key TEXT, value TEXT)" % name)
sql = "INSERT INTO %s VALUES (%%s, %%s)" % name
for line in fd:
for line in utils.nonCommentNonEmptyLines(fd):
line = line.rstrip('\r\n')
if not line or line.startswith('#'):
continue
try:
(key, value) = self._splitRe.split(line, 1)
key = key.replace('\\:', ':')