We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 227295d commit 45fedaeCopy full SHA for 45fedae
scscp/cli.py
@@ -19,9 +19,9 @@ def __init__(self, name, cd, cli):
19
self.cd = cd
20
self._cli = cli
21
self._om = om.OMSymbol(name, cd=cd)
22
- def __call__(self, data, cookie=False, **opts):
+ def __call__(self, data, cookie=False, timeout=-1, **opts):
23
res = self._cli._call_wait(om.OMApplication(self._om, map(_conv_if_py, data)),
24
- cookie, **opts)
+ cookie, timeout=timeout, **opts)
25
if res.type == 'procedure_completed':
26
try:
27
return convert.to_python(res.data)
@@ -76,9 +76,9 @@ def __init__(self, host, port=26133, populate=True):
76
if populate:
77
self.populate_heads()
78
79
- def _call_wait(self, data, cookie=False, **opts):
+ def _call_wait(self, data, cookie=False, timeout=-1, **opts):
80
call = self.call(data, cookie, **opts)
81
- resp = self.wait()
+ resp = self.wait(timeout)
82
83
if resp.id != call.id:
84
raise scscp.SCSCPProtocolError("Wrong call id (expected %s, got %s)."
0 commit comments