From 154260d1317010d7c4b387980e365563a267b3a6 Mon Sep 17 00:00:00 2001 From: CaitSith2 Date: Sun, 19 Jan 2020 01:25:51 -0800 Subject: [PATCH] Update Mystery.py Ignore comments in yaml files. --- Mystery.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Mystery.py b/Mystery.py index f09743bf..1ac7f740 100644 --- a/Mystery.py +++ b/Mystery.py @@ -14,6 +14,9 @@ def parse_yaml(txt): ret = {} indents = {len(txt) - len(txt.lstrip(' ')): ret} for line in txt.splitlines(): + if not line: + continue + line = line.split('#')[0] if not line: continue name, val = line.split(':', 1)