From 4ae14022ed0b63c5f54fb995008fc98633295d29 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Thu, 1 Feb 2024 15:24:42 +0800 Subject: [PATCH] Update ldtk_cjson.py --- benchmarks/ldtk_cjson.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/benchmarks/ldtk_cjson.py b/benchmarks/ldtk_cjson.py index 20965d2b..36529080 100644 --- a/benchmarks/ldtk_cjson.py +++ b/benchmarks/ldtk_cjson.py @@ -7,7 +7,11 @@ import sys is_pkpy = not hasattr(sys, 'getrefcount') if is_pkpy: - import cjson as json + try: + import cjson as json + except ImportError: + print('[cJSON not Enabled]') + exit(0) else: import json