|
a/src/mediaserver/cdplugins/pycommon/cmdtalkplugin.py |
|
b/src/mediaserver/cdplugins/pycommon/cmdtalkplugin.py |
|
... |
|
... |
35 |
def run(self, nm, params):
|
35 |
def run(self, nm, params):
|
36 |
func = self.map[nm]
|
36 |
func = self.map[nm]
|
37 |
return func(params)
|
37 |
return func(params)
|
38 |
|
38 |
|
39 |
class Processor:
|
39 |
class Processor:
|
40 |
def __init__(self, dispatcher, outfile=sys.stdout, infile=sys.stdin):
|
40 |
def __init__(self, dispatcher, outfile=sys.stdout, infile=sys.stdin,
|
|
|
41 |
exitfunc=None):
|
41 |
self.em = cmdtalk.CmdTalk(outfile=outfile, infile=infile)
|
42 |
self.em = cmdtalk.CmdTalk(outfile=outfile, infile=infile,
|
|
|
43 |
exitfunc=exitfunc)
|
42 |
self.dispatcher = dispatcher
|
44 |
self.dispatcher = dispatcher
|
43 |
|
45 |
|
44 |
def log(self, s, doexit = 0, exitvalue = 1):
|
46 |
def log(self, s, doexit = 0, exitvalue = 1):
|
45 |
self.em.log(s, doexit, exitvalue)
|
47 |
self.em.log(s, doexit, exitvalue)
|
46 |
|
48 |
|