Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tutorius/translator.py
diff options
context:
space:
mode:
Diffstat (limited to 'tutorius/translator.py')
-rw-r--r--tutorius/translator.py26
1 files changed, 12 insertions, 14 deletions
diff --git a/tutorius/translator.py b/tutorius/translator.py
index bc98fc5..9cd4f98 100644
--- a/tutorius/translator.py
+++ b/tutorius/translator.py
@@ -16,7 +16,7 @@
import os
import logging
-import copy
+import copy as copy_module
logger = logging.getLogger("ResourceTranslator")
@@ -135,10 +135,10 @@ class ResourceTranslator(object):
## Unchanged functions ##
def setCurrentActivity(self, activity_id):
- self._probe_manager.setCurrentActivity(activity_id)
+ self._probe_manager.currentActivity = activity_id
def getCurrentActivity(self):
- return self._probe_manager.getCurrentActivity()
+ return self._probe_manager.currentActivity
currentActivity = property(fget=getCurrentActivity, fset=setCurrentActivity)
def attach(self, activity_id):
@@ -150,11 +150,8 @@ class ResourceTranslator(object):
def subscribe(self, event, callback):
return self._probe_manager.subscribe(event, callback)
- def unsubscribe(self, event, callback):
- return self._probe_manager.unsubscribe(event, callback)
-
- def unsubscribe_all(self):
- return self._probe_manager.unsubscribe_all()
+ def unsubscribe(self, address):
+ return self._probe_manager.unsubscribe(address)
def register_probe(self, process_name, unique_id):
self._probe_manager.register_probe(process_name, unique_id)
@@ -170,7 +167,7 @@ class ResourceTranslator(object):
# Make a new copy of the action that we want to install,
# because translate() changes the action and we
# don't want to modify the caller's action representation
- new_action = copy.deepcopy(action)
+ new_action = copy_module.deepcopy(action)
# Execute the replacement
self.translate(new_action)
@@ -178,17 +175,18 @@ class ResourceTranslator(object):
return self._probe_manager.install(new_action, block)
def update(self, action, newaction, block=False):
- translated_new_action = copy.deepcopy(newaction)
+ # TODO : Repair this as it currently doesn't work.
+ # Actions are being copied, then translated in install(), so they
+ # won't be addressable via the same object that is in the Tutorial
+ # Runner.
+ translated_new_action = copy_module.deepcopy(newaction)
self.translate(translated_new_action)
return self._probe_manager.update(action, translated_new_action, block)
def uninstall(self, action, block=False):
- new_action = copy.deepcopy(action)
+ new_action = copy_module.deepcopy(action)
self.translate(new_action)
return self._probe_manager.uninstall(new_action, block)
- def uninstall_all(self):
- return self._probe_manager.uninstall_all()
-