MCPcopy
hub / github.com/pyload/pyload / readConfig

Method readConfig

module/ConfigParser.py:99–117  ·  view source on GitHub ↗

reads the config file

(self)

Source from the content-addressed store, hash-verified

97 raise
98
99 def readConfig(self):
100 """reads the config file"""
101
102 self.config = self.parseConfig(join(pypath, "module", "config", "default.conf"))
103 self.plugin = self.parseConfig("plugin.conf")
104
105 try:
106 homeconf = self.parseConfig("pyload.conf")
107 if "username" in homeconf["remote"]:
108 if "password" in homeconf["remote"]:
109 self.oldRemoteData = {"username": homeconf["remote"]["username"]["value"],
110 "password": homeconf["remote"]["username"]["value"]}
111 del homeconf["remote"]["password"]
112 del homeconf["remote"]["username"]
113 self.updateValues(homeconf, self.config)
114
115 except Exception, e:
116 print "Config Warning"
117 print_exc()
118
119
120 def parseConfig(self, config):

Callers 1

__init__Method · 0.95

Calls 2

parseConfigMethod · 0.95
updateValuesMethod · 0.95

Tested by

no test coverage detected