(data, path)
| 19 | return os.path.dirname(file_path) |
| 20 | |
| 21 | def write_json(data, path): |
| 22 | try: |
| 23 | with open(path, 'w', encoding="utf-8") as fp: |
| 24 | json.dump(data, fp) |
| 25 | except FileNotFoundError: |
| 26 | create_directory_if_not_exists(get_directory_path(path)) |
| 27 | return write_json(data, path) |
| 28 | |
| 29 | |
| 30 | def getfnname(func): |
no test coverage detected