check ConfigPIN default
authorFelix Domke <tmbinc@elitedvb.net>
Sun, 8 Oct 2006 22:46:57 +0000 (22:46 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Sun, 8 Oct 2006 22:46:57 +0000 (22:46 +0000)
lib/python/Components/config.py

index 343632d..7ab7814 100644 (file)
@@ -439,6 +439,7 @@ class ConfigInteger(ConfigSequence):
 
 class ConfigPIN(ConfigSequence):
        def __init__(self, default, len = 4, censor = ""):
+               assert isinstance(default, int), "ConfigPIN default must be an integer"
                ConfigSequence.__init__(self, seperator = ":", limits = [(0, (10**len)-1)], censor_char = censor, default = [default])
 
 class ConfigFloat(ConfigSequence):