MCPcopy Create free account
hub / github.com/dashingsoft/pyarmor-webui / _config_filename

Method _config_filename

handler.py:73–83  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

71 return os.path.join(c['homepath'], self.name + 's')
72
73 def _config_filename(self):
74 path = self._get_path()
75 filename = os.path.join(path, self.data_file)
76 if not os.path.exists(filename):
77 if not os.path.exists(path):
78 os.makedirs(path)
79 data = dict(counter=0)
80 data[self.name + 's'] = []
81 with open(filename, 'w') as fp:
82 json.dump(data, fp)
83 return filename
84
85 def _get_config(self):
86 with open(self._config_filename(), 'r') as fp:

Callers 2

_get_configMethod · 0.95
_set_configMethod · 0.95

Calls 1

_get_pathMethod · 0.95

Tested by

no test coverage detected