projects
/
dbuscron
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
d0d855d
)
DbusRule.unregister() method
author
Konstantin Stepanov
<kstep@p-nut.info>
Fri, 10 Dec 2010 22:30:02 +0000
(
00:30
+0200)
committer
Konstantin Stepanov
<kstep@p-nut.info>
Fri, 10 Dec 2010 22:30:02 +0000
(
00:30
+0200)
dbuscron/bus.py
patch
|
blob
|
history
diff --git
a/dbuscron/bus.py
b/dbuscron/bus.py
index
9bf73a8
..
468abc0
100644
(file)
--- a/
dbuscron/bus.py
+++ b/
dbuscron/bus.py
@@
-73,7
+73,15
@@
class DbusRule(object):
def register(self):
rule = str(self)
if rule:
- self._bus.add_match_string(str(self))
+ self._bus.add_match_string(rule)
+
+ def unregister(self):
+ rule = str(self)
+ if rule:
+ self._bus.remove_match_string(rule)
+
+ #def __del__(self):
+ # self.unregister()
def __str__(self):
rule = []