Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraleherbau2011-04-05 12:31:59 +0000
committeraleherbau2011-04-05 12:31:59 +0000
commitc1641a0ba3d0fc310fb909fe0b62531f55440c93 (patch)
treeb85b98e46d5b9d826c796a1105697c1d26efed87 /python/src/tcf/util
parent559ca401ad7f4f02875edeefaf2b56dc79702000 (diff)
downloadorg.eclipse.tcf-c1641a0ba3d0fc310fb909fe0b62531f55440c93.tar.gz
org.eclipse.tcf-c1641a0ba3d0fc310fb909fe0b62531f55440c93.tar.xz
org.eclipse.tcf-c1641a0ba3d0fc310fb909fe0b62531f55440c93.zip
Fixed serialization issues and added Diagnostics tests
Diffstat (limited to 'python/src/tcf/util')
-rw-r--r--python/src/tcf/util/sync.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/python/src/tcf/util/sync.py b/python/src/tcf/util/sync.py
index cb44b94d6..e37420974 100644
--- a/python/src/tcf/util/sync.py
+++ b/python/src/tcf/util/sync.py
@@ -84,13 +84,13 @@ class CommandControl(object):
if not error and args:
# error result is usually in args[0]
if service == "StackTrace" and command == "getContext":
- err = self.toError(args[1])
+ error = self.toError(args[1])
+ resultArgs = (args[0],)
+ elif service == "Diagnostics" and command.startswith("echo"):
resultArgs = (args[0],)
else:
- err = self.toError(args[0])
+ error = self.toError(args[0])
resultArgs = args[1:]
- if err:
- error = err
cmdCtrl._doneCommand(self.token, error, resultArgs)
def wait(self, timeout=None):
cmdCtrl._waitForCommand(self.token, timeout)
@@ -142,7 +142,9 @@ class CommandControl(object):
if cmd._async: self._complete.append(cmd)
isDone = self.isDone()
if isDone: self._lock.notifyAll()
- if cmd._onDone: cmd._onDone(error, *args)
+ if cmd._onDone:
+ if args is None: args = (None,)
+ cmd._onDone(error, *args)
if isDone and self._onDone: self._onDone()
def isDone(self):
with self._lock:

Back to the top