MCPcopy Index your code
hub / github.com/pyload/pyload / parse_updates

Method parse_updates

module/plugins/hooks/UpdateManager.py:223–245  ·  view source on GitHub ↗
(self, server_data)

Source from the content-addressed store, hash-verified

221 return exitcode
222
223 def parse_updates(self, server_data):
224 schema = server_data[2].split('|')
225
226 if "BLACKLIST" in server_data:
227 blacklist = server_data[server_data.index('BLACKLIST') + 1:]
228 updatelist = server_data[3:server_data.index('BLACKLIST')]
229 else:
230 blacklist = []
231 updatelist = server_data[3:]
232
233 for l in updatelist, blacklist:
234 nl = []
235 for line in l:
236 d = dict(zip(schema, line.split('|')))
237 d['name'] = d['name'].rsplit('.py', 1)[0]
238 nl.append(d)
239 l[:] = nl
240
241 updatelist = sorted(updatelist,
242 key=operator.itemgetter("type", "name"))
243 blacklist = sorted(blacklist, key=operator.itemgetter("type", "name"))
244
245 return updatelist, blacklist
246
247 def _update_plugins(self, server_data):
248 """

Callers 1

_update_pluginsMethod · 0.95

Calls 5

dictFunction · 0.85
splitMethod · 0.80
rsplitMethod · 0.80
indexMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected