mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Changed slightly to use nonCommentNonEmptyLines.
This commit is contained in:
parent
992781c908
commit
65b139dda9
@ -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('\\:', ':')
|
||||
|
Loading…
Reference in New Issue
Block a user