Permalink
Browse files

Version bump

Make it easier to add new handlers
  • Loading branch information...
1 parent 6b94bcf commit 525bdcd0348eaadd54c903bf3448351e467a5b85 @fmoo committed Nov 11, 2012
Showing with 9 additions and 3 deletions.
  1. +4 −0 CHANGES.txt
  2. +1 −1 sparts/__init__.py
  3. +4 −2 sparts/tasks/dbus.py
View
4 CHANGES.txt
@@ -1,6 +1,10 @@
CHANGES
=======
+0.2.2
+-----
+* Add new DBusServiceTask::addHandlers() to make it easier to add handlers
+
0.2.1
-----
* Hooks to improve dbus extensibility
View
2 sparts/__init__.py
@@ -1 +1 @@
-__version__ = '0.2.1'
+__version__ = '0.2.2'
View
6 sparts/tasks/dbus.py
@@ -134,21 +134,23 @@ class DBusServiceTask(DBusTask):
def initTask(self):
super(DBusServiceTask, self).initTask()
-
+
assert self.bus_name is not None, \
"You must pass a --{task}-bus-name"
def start(self):
self.bus = dbus.SessionBus(private=True)
self.dbus_service = dbus.service.BusName(self.bus_name, self.bus,
self.replace, self.replace, self.queue)
+ self.addHandlers()
+ super(DBusServiceTask, self).start()
+ def addHandlers(self):
self.sparts_dbus = self.BUS_CLASS(self)
task = self.service.getTask(FB303ProcessorTask)
if task is not None:
self.fb303_dbus = FacebookDbusService(
self.dbus_service, task.processor, self.service.name)
- super(DBusServiceTask, self).start()
def stop(self):
del(self.dbus_service)

0 comments on commit 525bdcd

Please sign in to comment.