diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2005-09-03 01:13:53 +0000 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2005-09-03 01:13:53 +0000 |
| commit | bbcd2c8be1bd2ce4681a80c82bbb00ac04137505 (patch) | |
| tree | 456305c9edfafcc6e83254645db3a26623bb2a38 /lib/python/Components/config.py | |
| parent | aed130dec1e35bf1907d82b6ee18fee965bde091 (diff) | |
| download | enigma2-bbcd2c8be1bd2ce4681a80c82bbb00ac04137505.tar.gz enigma2-bbcd2c8be1bd2ce4681a80c82bbb00ac04137505.zip | |
- adding netmask to network setup
- writing network config (to /etc/network/interfaces.tmp for now)
- adding magic to config.py
Diffstat (limited to 'lib/python/Components/config.py')
| -rw-r--r-- | lib/python/Components/config.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index 1795d426..2fd0ff15 100644 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -128,7 +128,8 @@ class configSequence: if diff > 0: value += " " * diff value += str(i) - +# or the above code if you have to spare ink +# value = ((len(self.parent.value) * ("%0" + str(self.parent.vals[1]) + "d" + self.parent.vals[0]))[0:-1]) % tuple(self.parent.value) value = value[0:mPos] + "_" + value[mPos + 1:] return ("text", value) @@ -203,11 +204,13 @@ class configElement: elif control == configSelection: return str(data); elif control == configSequence: - value = "" - for i in data: - if value !="": - value += self.vals[0] - value += str(i) + value = ((len(data) * ("%d" + self.vals[0]))[0:-1]) % tuple(data) +# just in case you don't understand the above, here an equivalent: +# value = "" +# for i in data: +# if value !="": +# value += self.vals[0] +# value += str(i) return value else: return "" |
