mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-30 14:14:37 +01:00
Made addlookup ignore comment lines (designated by initial '#').
This commit is contained in:
parent
2da90c99d6
commit
dba6ae9217
@ -156,6 +156,8 @@ class Lookup(callbacks.Privmsg):
|
||||
cursor.execute("""CREATE TABLE %s (key TEXT, value TEXT)""" % name)
|
||||
sql = """INSERT INTO %s VALUES (%%s, %%s)""" % name
|
||||
for line in fd:
|
||||
if line.startswith('#'):
|
||||
continue
|
||||
line = line.rstrip('\r\n')
|
||||
try:
|
||||
(key, value) = line.split(':', 1)
|
||||
|
Loading…
Reference in New Issue
Block a user