MCPcopy Create free account
hub / github.com/EasyIME/PIME / save

Method save

python/cinbase/config.py:128–136  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

126 return {key: value for key, value in self.__dict__.items() if not key.startswith("_") and not key in self.ignoreSaveList}
127
128 def save(self):
129 filename = self.getConfigFile()
130 try:
131 with open(filename, "w") as f:
132 jsondata = {key: value for key, value in self.__dict__.items() if not key in self.ignoreSaveList}
133 js = json.dump(jsondata, f, sort_keys=True, indent=4)
134 self.update()
135 except Exception:
136 pass # FIXME: handle I/O errors?
137
138 def getDataDir(self):
139 return os.path.join(os.path.dirname(__file__), "data")

Callers 2

loadMethod · 0.95
checkConfigChangeMethod · 0.45

Calls 3

getConfigFileMethod · 0.95
updateMethod · 0.95
itemsMethod · 0.80

Tested by

no test coverage detected