From 1cfcc2b592f682d2b50a0c4188fa3ae832a6c682 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Thu, 14 May 2020 09:58:16 -0700 Subject: [PATCH] tighten up line test logic when counting tabs --- jc/parsers/dmidecode.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jc/parsers/dmidecode.py b/jc/parsers/dmidecode.py index 6244f732..aa368bc7 100644 --- a/jc/parsers/dmidecode.py +++ b/jc/parsers/dmidecode.py @@ -274,6 +274,7 @@ def parse(data, raw=False, quiet=False): if item_values \ and len(line.split(':', maxsplit=1)) == 2 \ and line.startswith('\t') \ + and not line.startswith('\t\t') \ and not line.strip().endswith(':'): item_header = False item_values = True @@ -294,6 +295,7 @@ def parse(data, raw=False, quiet=False): # multi-line key if item_values \ and line.startswith('\t') \ + and not line.startswith('\t\t') \ and line.strip().endswith(':'): item_header = False item_values = True