def write_config(self):
if not os.path.exists(os.path.dirname(self.config_file)):<EOL><INDENT>os.makedirs(os.path.dirname(self.config_file))<EOL><DEDENT>with open(self.config_file, '<STR_LIT:w>') as f:<EOL><INDENT>f.write(json.dumps(self.config))<EOL>f.close()<EOL><DEDENT>
Write config to file