From: Binokkio Date: Sun, 27 Dec 2020 10:24:17 +0000 (+0100) Subject: Excluding yaml parsing lines from coverage since pyyaml is not a dependency X-Git-Url: https://git.devinivas.org/?a=commitdiff_plain;h=476cd2d0a7cd18c65d30e740b528e7dd5314a91b;p=chevron.git Excluding yaml parsing lines from coverage since pyyaml is not a dependency --- diff --git a/chevron/main.py b/chevron/main.py index 5efe763..d941ff4 100755 --- a/chevron/main.py +++ b/chevron/main.py @@ -33,8 +33,8 @@ def main(template, data={}, **kwargs): def _load_data(file, yaml_loader): try: import yaml - loader = getattr(yaml, yaml_loader) - return yaml.load(file, Loader=loader) + loader = getattr(yaml, yaml_loader) # not tested + return yaml.load(file, Loader=loader) # not tested except ImportError: import json return json.load(file)