mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 20:52:42 +01:00
Made configure handle comments and empty lines.
This commit is contained in:
parent
27ce1d3cc7
commit
6ae0a0b8c4
@ -68,6 +68,9 @@ def configure(onStart, afterConnect, advanced):
|
|||||||
counter = 1
|
counter = 1
|
||||||
try:
|
try:
|
||||||
for line in fd:
|
for line in fd:
|
||||||
|
line = line.rstrip('\r\n')
|
||||||
|
if not line or line.startswith('#'):
|
||||||
|
continue
|
||||||
(key, value) = line.split(':', 1)
|
(key, value) = line.split(':', 1)
|
||||||
counter += 1
|
counter += 1
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
Loading…
Reference in New Issue
Block a user