aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-10-08 23:08:32 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-10-08 23:08:32 +0000
commitbce737aacfca6fc825d35e2e172c7e6bef6d85d3 (patch)
treec9ea2f35c61b2a2ec7e4bcc9eeb6863d8e091a06 /lib/python/Components
parent6f6514f64e4c769da57acd9c6070bc658c918fe8 (diff)
downloadenigma2-bce737aacfca6fc825d35e2e172c7e6bef6d85d3.tar.gz
enigma2-bce737aacfca6fc825d35e2e172c7e6bef6d85d3.zip
fix configPIN,
add getLength() method to getPIN
Diffstat (limited to 'lib/python/Components')
-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):