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

Method slotRemoveConnection

pyLoadGui.py:383–400  ·  view source on GitHub ↗

remove connection from config file

(self, data)

Source from the content-addressed store, hash-verified

381 self.refreshConnections()
382
383 def slotRemoveConnection(self, data):
384 """
385 remove connection from config file
386 """
387 connectionsNode = self.parser.xml.elementsByTagName("connections").item(0)
388 if connectionsNode.isNull():
389 raise Exception("null")
390 connections = self.parser.parseNode(connectionsNode)
391 found = False
392 for c in connections:
393 cid = c.attribute("id", "None")
394 if str(cid) == str(data["id"]):
395 found = c
396 break
397 if found:
398 connectionsNode.removeChild(found)
399 self.parser.saveData()
400 self.refreshConnections()
401
402 def slotConnect(self, data):
403 """

Callers

nothing calls this directly

Calls 4

refreshConnectionsMethod · 0.95
parseNodeMethod · 0.80
removeChildMethod · 0.80
saveDataMethod · 0.80

Tested by

no test coverage detected