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

Method onEnter

module/cli/AddPackage.py:31–45  ·  view source on GitHub ↗
(self, inp)

Source from the content-addressed store, hash-verified

29 self.urls = []
30
31 def onEnter(self, inp):
32 if inp == "0":
33 self.cli.reset()
34
35 if not self.name:
36 self.name = inp
37 self.setInput()
38 elif inp == "END":
39 #add package
40 self.client.addPackage(self.name, self.urls, 1)
41 self.cli.reset()
42 else:
43 if inp.strip():
44 self.urls.append(inp)
45 self.setInput()
46
47 def renderBody(self, line):
48 println(line, white(_("Add Package:")))

Callers

nothing calls this directly

Calls 4

resetMethod · 0.45
setInputMethod · 0.45
addPackageMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected