MCPcopy Index your code
hub / github.com/HelloZeroNet/ZeroNet / loadConfig

Method loadConfig

src/Plugin/PluginManager.py:42–50  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

40 DebugReloader.watcher.addCallback(self.reloadPlugins)
41
42 def loadConfig(self):
43 if os.path.isfile(self.config_path):
44 try:
45 self.config = json.load(open(self.config_path, encoding="utf8"))
46 except Exception as err:
47 self.log.error("Error loading %s: %s" % (self.config_path, err))
48 self.config = {}
49 else:
50 self.config = {}
51
52 def saveConfig(self):
53 f = open(self.config_path, "w", encoding="utf8")

Callers 1

__init__Method · 0.95

Calls 2

errorMethod · 0.80
loadMethod · 0.45

Tested by

no test coverage detected