(filename)
| 46 | |
| 47 | |
| 48 | def json_2_yaml_convert(filename): |
| 49 | data = None |
| 50 | try: |
| 51 | with open(filename, "r") as json_file: |
| 52 | data = json.load(json_file) |
| 53 | except: |
| 54 | PRINT("Failed on {}".format(filename)) |
| 55 | traceback.print_exc() |
| 56 | return (filename, "") |
| 57 | new_filename = os.path.splitext(filename)[0] + ".yaml" |
| 58 | with open(new_filename, "w") as yaml_file: |
| 59 | yaml_file.write(YAML_HEADER + "\n") |
| 60 | yaml_file.write(yaml.safe_dump(data, default_flow_style=False)) |
| 61 | return (filename, new_filename) |
| 62 | |
| 63 | |
| 64 | def git_rm(filename): |