Merge pull request #7 from CaitSith2/patch-3

Update Mystery.py
This commit is contained in:
Fabian Dill 2020-01-19 21:53:13 +01:00 committed by GitHub
commit 7c82baca75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -14,6 +14,9 @@ def parse_yaml(txt):
ret = {} ret = {}
indents = {len(txt) - len(txt.lstrip(' ')): ret} indents = {len(txt) - len(txt.lstrip(' ')): ret}
for line in txt.splitlines(): for line in txt.splitlines():
if not line:
continue
line = line.split('#')[0]
if not line: if not line:
continue continue
name, val = line.split(':', 1) name, val = line.split(':', 1)