From b290d0384ea13319026ddcaeca5d567a2556f0e3 Mon Sep 17 00:00:00 2001 From: mike Date: Thu, 26 Nov 2009 23:03:38 +0000 Subject: LP 448319 : Code review changes 2 --- (limited to 'tutorius/TProbe.py') diff --git a/tutorius/TProbe.py b/tutorius/TProbe.py index e408fe9..dd27762 100644 --- a/tutorius/TProbe.py +++ b/tutorius/TProbe.py @@ -29,7 +29,7 @@ from . import addon from .services import ObjectStore from .properties import TPropContainer -from .dbustools import remote_call, save_args, ignore, logError +from .dbustools import remote_call, save_args import copy """ @@ -359,7 +359,7 @@ class ProbeProxy: del self._actions[this_action] break - def __update_event(self, event_name, event, callback, event_subscribed_cb, address): + def __update_event(self, event, callback, event_subscribed_cb, address): LOGGER.debug("ProbeProxy :: Registered event %s with address %s", str(hash(event)), str(address)) # Since multiple callbacks could be associated to the same # event signature, we will store multiple callbacks @@ -408,7 +408,7 @@ class ProbeProxy: else: LOGGER.debug("ProbeProxy :: unsubsribe address %s inconsistency : not registered", address) - def subscribe(self, event_name, event, notification_cb, event_subscribed_cb, error_cb): + def subscribe(self, event, notification_cb, event_subscribed_cb, error_cb): """ Register an event listener @param event Event to listen for @@ -425,7 +425,7 @@ class ProbeProxy: # for event types and sources, we will need to revise the lookup # mecanism for which callback function to call self._probe.subscribe(pickle.dumps(event), - reply_handler=save_args(self.__update_event, event_name, event, notification_cb, event_subscribed_cb), + reply_handler=save_args(self.__update_event, event, notification_cb, event_subscribed_cb), error_handler=save_args(error_cb, event)) def unsubscribe(self, address, block=True): @@ -526,7 +526,7 @@ class ProbeManager(object): else: raise RuntimeWarning("No activity attached") - def subscribe(self, event_name, event, notification_cb, event_subscribed_cb, error_cb): + def subscribe(self, event, notification_cb, event_subscribed_cb, error_cb): """ Register an event listener @param event Event to listen for @@ -538,7 +538,7 @@ class ProbeManager(object): @return address identifier used for unsubscribing """ if self.currentActivity: - return self._first_proxy(self.currentActivity).subscribe(event_name, event, notification_cb,\ + return self._first_proxy(self.currentActivity).subscribe(event, notification_cb,\ event_subscribed_cb, error_cb) else: raise RuntimeWarning("No activity attached") -- cgit v0.9.1