VirtualMailManager/config.py
branchv0.7.x
changeset 638 0de0b9e75c9f
parent 611 8e9b0046bc8f
child 641 724ac0a4068d
--- a/VirtualMailManager/config.py	Sun Nov 04 18:33:11 2012 +0000
+++ b/VirtualMailManager/config.py	Mon Nov 05 21:57:37 2012 +0000
@@ -246,10 +246,7 @@
           check the value, when `LazyConfig.set()` is called.
         """
         self.__cls = cls
-        if not default is None:  # enforce the type of the default value
-            self.__default = self.__cls(default)
-        else:
-            self.__default = default
+        self.__default = default if default is None else self.__cls(default)
         if not callable(getter):
             raise TypeError('getter has to be a callable, got a %r' %
                             getter.__class__.__name__)