diff options
| author | Andreas Frisch <andreas.frisch@multimedia-labs.de> | 2008-10-07 10:48:06 +0000 |
|---|---|---|
| committer | Andreas Frisch <andreas.frisch@multimedia-labs.de> | 2008-10-07 10:48:06 +0000 |
| commit | 536c9954a0ead206b875cda6f1ccff361e354ab7 (patch) | |
| tree | 0564c7c2a4fad13ab26680e441f5e21c3ef2889f /lib/python/Components | |
| parent | f011625d4c8a1a7be9b6c147f5ab849fd5616071 (diff) | |
| download | enigma2-536c9954a0ead206b875cda6f1ccff361e354ab7.tar.gz enigma2-536c9954a0ead206b875cda6f1ccff361e354ab7.zip | |
don't display leading zeros for IP addresses
Diffstat (limited to 'lib/python/Components')
| -rw-r--r-- | lib/python/Components/config.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index b91c449e..7fbe13b7 100644 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -507,6 +507,19 @@ class ConfigIP(ConfigSequence): def getHTML(self, id): # we definitely don't want leading zeros return '.'.join(["%d" % d for d in self.value]) + + def genText(self): + value = "" + mPos = self.marked_pos + num = 0; + for i in self._value: + if len(value): + value += self.seperator + if mPos >= len(value) - 1: + mPos += 1 + value += str(i) + num += 1 + return (value, mPos) class ConfigMAC(ConfigSequence): def __init__(self, default): |
