From 5cde127a04a87f1062648a0244e5d57e8d493735 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Sat, 10 Feb 2024 14:58:15 -0800 Subject: [PATCH] raise ParseError instead of output empty object for disabled parser --- jc/parsers/disabled_parser.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jc/parsers/disabled_parser.py b/jc/parsers/disabled_parser.py index abca16a6..1ed79a89 100644 --- a/jc/parsers/disabled_parser.py +++ b/jc/parsers/disabled_parser.py @@ -1,4 +1,8 @@ -"""jc - JSON Convert disabled parser""" +"""jc - JSON Convert disabled parser + +This parser has been disabled due to an error in the parser code. +""" +from jc.exceptions import ParseError class info(): """Provides parser metadata (version, author, etc.)""" @@ -19,4 +23,4 @@ def parse( quiet: bool = False ) -> dict: """Main text parsing function""" - return {} + raise ParseError('This parser is disabled.')