16 lines
345 B
Python
Executable File
16 lines
345 B
Python
Executable File
import json
|
|
import logging
|
|
|
|
_logger = logging.getLogger(__name__)
|
|
|
|
# note that json is insecure by default right?
|
|
# but don't worry for now
|
|
# TODO: if this ever matters, can improve file handling.
|
|
|
|
|
|
def read_json_file(filename):
|
|
try:
|
|
return json.load(filename)
|
|
except Exception:
|
|
_logger.exception(f"failed on reading filename {filename}")
|