mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-10 17:43:46 +01:00
11 lines
208 B
Python
11 lines
208 B
Python
|
def parse_conf(string):
|
||
|
retval = {}
|
||
|
for line in string.split("\n"):
|
||
|
idx = line.find("=")
|
||
|
if idx > 0:
|
||
|
key = line[:idx].strip()
|
||
|
value = line[idx+1:].strip()
|
||
|
retval[key] = value
|
||
|
|
||
|
return retval
|