Author: andar

Revision: 5336

Log:
        Add ability to run individual set functions

Diff:
Modified: trunk/deluge/config.py
===================================================================
--- trunk/deluge/config.py      2009-06-01 23:46:35 UTC (rev 5335)
+++ trunk/deluge/config.py      2009-06-02 00:56:05 UTC (rev 5336)
@@ -271,6 +271,17 @@
         for key, value in self.__set_functions.iteritems():
             value(key, self.__config[key])
 
+    def apply_set_functions(self, key):
+        """
+        Calls set functions for `:param:key`.
+
+        :param key: str, the config key
+
+        """
+        log.debug("Calling set functions for key %s..", key)
+        if key in self.__set_functions:
+            self.__set_functions[key](key, self.__config[key])
+
     def load(self, filename=None):
         """
         Load a config file



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to