Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2012-01-10 04:03:04 -0500
committerAnton Leherbauer2012-01-10 04:03:25 -0500
commitc64f2281df96e79fe524cf8594d9434e2d672ee5 (patch)
tree1062bbe181cdfe6bb315e481bd19178135352df9
parentb54f568cbaa1ba2d0c722b7f55da1ef242a01c7b (diff)
downloadorg.eclipse.tcf-c64f2281df96e79fe524cf8594d9434e2d672ee5.tar.gz
org.eclipse.tcf-c64f2281df96e79fe524cf8594d9434e2d672ee5.tar.xz
org.eclipse.tcf-c64f2281df96e79fe524cf8594d9434e2d672ee5.zip
TCF Python: Fix bogus MemoryProxy._toContextArray
-rw-r--r--python/src/tcf/services/remote/MemoryProxy.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/python/src/tcf/services/remote/MemoryProxy.py b/python/src/tcf/services/remote/MemoryProxy.py
index 10de25cff..ebf8a2420 100644
--- a/python/src/tcf/services/remote/MemoryProxy.py
+++ b/python/src/tcf/services/remote/MemoryProxy.py
@@ -1,5 +1,5 @@
# *******************************************************************************
-# * Copyright (c) 2011 Wind River Systems, Inc. and others.
+# * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others.
# * All rights reserved. This program and the accompanying materials
# * are made available under the terms of the Eclipse Public License v1.0
# * which accompanies this distribution, and is available at
@@ -211,10 +211,10 @@ class ChannelEventListener(channel.EventListener):
args = channel.fromJSONSequence(data)
if name == "contextAdded":
assert len(args) == 1
- self.listener.contextAdded(_toContextArray(args[0]))
+ self.listener.contextAdded(_toContextArray(self.service, args[0]))
elif name == "contextChanged":
assert len(args) == 1
- self.listener.contextChanged(_toContextArray(args[0]))
+ self.listener.contextChanged(_toContextArray(self.service, args[0]))
elif name == "contextRemoved":
assert len(args) == 1
self.listener.contextRemoved(args[0])
@@ -227,9 +227,11 @@ class ChannelEventListener(channel.EventListener):
self.service.channel.terminate(x)
-def _toContextArray(o):
+def _toContextArray(svc, o):
if o is None: return None
- return map(MemContext, o)
+ ctx = []
+ for m in o: ctx.append(MemContext(svc, m))
+ return ctx
def _toSizeArray(o):
if o is None: return None

Back to the top