mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-19 00:17:51 +02:00
use streaming parser list to find streaming parsers
This commit is contained in:
@ -11,7 +11,7 @@ import shlex
|
|||||||
import subprocess
|
import subprocess
|
||||||
import json
|
import json
|
||||||
from .lib import (__version__, all_parser_info, parsers,
|
from .lib import (__version__, all_parser_info, parsers,
|
||||||
_parser_argument, _get_parser)
|
_parser_argument, _get_parser, streaming_parser_mod_list)
|
||||||
from . import utils
|
from . import utils
|
||||||
from . import tracebackplus
|
from . import tracebackplus
|
||||||
from .exceptions import LibraryNotInstalled, ParseError
|
from .exceptions import LibraryNotInstalled, ParseError
|
||||||
@ -502,7 +502,7 @@ def main():
|
|||||||
# differentiate between regular and streaming parsers
|
# differentiate between regular and streaming parsers
|
||||||
|
|
||||||
# streaming
|
# streaming
|
||||||
if getattr(parser.info, 'streaming', None):
|
if parser_name in streaming_parser_mod_list():
|
||||||
result = parser.parse(sys.stdin,
|
result = parser.parse(sys.stdin,
|
||||||
raw=raw,
|
raw=raw,
|
||||||
quiet=quiet,
|
quiet=quiet,
|
||||||
|
Reference in New Issue
Block a user