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

Method load_data

python/cinbase/configtool.py:160–169  ·  view source on GitHub ↗
(self, name)

Source from the content-addressed store, hash-verified

158 print(e)
159
160 def load_data(self, name):
161 try:
162 userFile = os.path.join(config_dir, name)
163 with open(userFile, "r", encoding="UTF-8") as f:
164 return f.read()
165 except FileNotFoundError:
166 with open(os.path.join(data_dir, name), "r", encoding="UTF-8") as f:
167 return f.read()
168 except Exception:
169 return ""
170
171 def save_file(self, filename, data):
172 try:

Callers 1

getMethod · 0.95

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected