(filename:str, override=False)
| 96 | |
| 97 | @staticmethod |
| 98 | def save_settings(filename:str, override=False)->None: |
| 99 | |
| 100 | try: |
| 101 | filename = os.path.expanduser(filename) |
| 102 | if Util.check_file(filename) and not override: |
| 103 | raise MapXploreException(message_key="file_exists", isError=False) |
| 104 | else: |
| 105 | with open(filename, "w") as jfile: |
| 106 | json.dump(Settings.setting, jfile) |
| 107 | except MapXploreException as e: |
| 108 | raise e |
| 109 | except Exception as e: |
| 110 | raise MapXploreException(e) |
| 111 | |
| 112 | @staticmethod |
| 113 | def load_settings(filename:str)->None: |
no test coverage detected