Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraleherbau2011-05-19 12:48:10 +0000
committeraleherbau2011-05-19 12:48:10 +0000
commita1dfa9cc409eb736911e0be32b45f57a866e34c5 (patch)
tree97b7fa6c87076479630bdbc6a098d454264798e5 /python/src/tcf/channel/ChannelProxy.py
parent506dcea466abc2e93a508ddfbe2814d1046f3635 (diff)
downloadorg.eclipse.tcf-a1dfa9cc409eb736911e0be32b45f57a866e34c5.tar.gz
org.eclipse.tcf-a1dfa9cc409eb736911e0be32b45f57a866e34c5.tar.xz
org.eclipse.tcf-a1dfa9cc409eb736911e0be32b45f57a866e34c5.zip
TCF Python: Implemented Memory and MemoryMap service proxies, code cleanup
Diffstat (limited to 'python/src/tcf/channel/ChannelProxy.py')
-rw-r--r--python/src/tcf/channel/ChannelProxy.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/python/src/tcf/channel/ChannelProxy.py b/python/src/tcf/channel/ChannelProxy.py
index b95eaeb11..eca426e3c 100644
--- a/python/src/tcf/channel/ChannelProxy.py
+++ b/python/src/tcf/channel/ChannelProxy.py
@@ -14,7 +14,6 @@ ChannelProxy implements forwarding of TCF messages between two channels.
The class is used to implement Locator service "redirect" command.
"""
-import exceptions
from tcf import channel
class ProxyCommandListener(channel.CommandListener):
@@ -27,7 +26,7 @@ class ProxyCommandListener(channel.CommandListener):
self.ch.sendResult(self.tokens.pop(token, None), data)
def terminated(self, token, error):
self.ch.rejectCommand(self.tokens.pop(token, None))
-
+
class ChannelProxy(object):
def __init__(self, x, y):
#assert not isinstance(x, ChannelLoop)
@@ -41,7 +40,7 @@ class ChannelProxy(object):
cmd_listener_x = ProxyCommandListener(self.ch_x, self.tokens_x)
cmd_listener_y = ProxyCommandListener(self.ch_y, self.tokens_y)
proxy = self
-
+
class ProxyX(channel.Proxy):
def onChannelClosed(self, error):
proxy.closed_x = True
@@ -58,7 +57,7 @@ class ChannelProxy(object):
s = proxy.ch_x.getRemoteService(service)
if not s: proxy.ch_x.terminate(IOError("Invalid service name"))
elif not proxy.closed_y: proxy.ch_y.sendEvent(s, name, data)
-
+
class ProxyY(channel.Proxy):
def onChannelClosed(self, error):
proxy.closed_y = True
@@ -84,7 +83,7 @@ class ChannelProxy(object):
class ChannelListener(channel.ChannelListener):
def onChannelClosed(self, error):
proxy.ch_y.removeChannelListener(self)
- if error is None: error = exceptions.Exception("Channel closed")
+ if error is None: error = Exception("Channel closed")
def onChannelOpened(self):
proxy.ch_y.removeChannelListener(self)
try:

Back to the top