aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/Components/config.py')
-rw-r--r--lib/python/Components/config.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py
index 7ab7814b..3e035d1e 100644
--- a/lib/python/Components/config.py
+++ b/lib/python/Components/config.py
@@ -382,7 +382,7 @@ class ConfigSequence(ConfigElement):
if self.censor_char == "":
value += ("%0" + str(len(str(self.limits[num][1]))) + "d") % i
else:
- value += (self.censorChar * len(str(self.limits[num][1])))
+ value += (self.censor_char * len(str(self.limits[num][1])))
num += 1
# only mark cursor when we are selected
@@ -437,10 +437,14 @@ class ConfigInteger(ConfigSequence):
def tostring(self, value):
return str(value)
-class ConfigPIN(ConfigSequence):
+class ConfigPIN(ConfigInteger):
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])
+ ConfigSequence.__init__(self, seperator = ":", limits = [(0, (10**len)-1)], censor_char = censor, default = default)
+ self.len = len
+
+ def getLength(self):
+ return self.len
class ConfigFloat(ConfigSequence):
def __init__(self, default, limits):