unregister dbus match rule in it's destructor
authorKonstantin Stepanov <kstep@p-nut.info>
Sat, 11 Dec 2010 23:59:02 +0000 (01:59 +0200)
committerKonstantin Stepanov <kstep@p-nut.info>
Sat, 11 Dec 2010 23:59:02 +0000 (01:59 +0200)
dbuscron.py
dbuscron/bus.py

index b3822e0..610f07f 100755 (executable)
@@ -53,8 +53,6 @@ if __name__ == '__main__':
 
     def reload_config_on_signal(sig_no, stack):
         log.info('Signal #%d received: reloading config...' % (sig_no))
-        for matcher, command in commands:
-            matcher.unregister()
         commands.clear()
         load_config(crontab)
         log.info('Done config reloading.')
index 468abc0..2bf9116 100644 (file)
@@ -80,8 +80,8 @@ class DbusRule(object):
         if rule:
             self._bus.remove_match_string(rule)
 
-    #def __del__(self):
-    #    self.unregister()
+    def __del__(self):
+       self.unregister()
 
     def __str__(self):
         rule = []