From f322e479cdf0d353c8356af767afc5906b50ffcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Mon, 7 Oct 2019 04:00:11 -0600 Subject: [PATCH] fix: Support for legacy python versions 90 days and counting, folks. --- pymisp/abstract.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pymisp/abstract.py b/pymisp/abstract.py index 651292f..9ffa86d 100644 --- a/pymisp/abstract.py +++ b/pymisp/abstract.py @@ -68,7 +68,7 @@ else: resources_path = Path(__file__).parent / 'data' misp_objects_path = resources_path / 'misp-objects' / 'objects' - with (resources_path / 'describeTypes.json').open('rb') as f: + with (resources_path / 'describeTypes.json').open('r') as f: describe_types = json.load(f)['result'] class MISPFileCache(object): @@ -76,7 +76,7 @@ else: @classmethod @lru_cache(maxsize=150) - def _load_json(cls, path: Path): + def _load_json(cls, path): with path.open('rb') as f: data = json.load(f) return data