From a0d13ab5a83d571b717120ef81f6c381dd1a3566 Mon Sep 17 00:00:00 2001 From: Ronny Strutz Date: Fri, 2 Sep 2005 12:24:58 +0000 Subject: [PATCH] add load/save for configSequence --- lib/python/Components/config.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index 14c03655..237e0bf8 100644 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -109,8 +109,8 @@ class configSequence: def __call__(self): #needed by configlist value = "" for i in self.parent.value: - if (value != ""): - value += self.parent.vals[0] + if value != "": + value += self.parent.vals value += str(i) return ("text", value) @@ -170,6 +170,12 @@ class configElement: return int(data); elif control == configBoolean: return int(data); + elif control == configSequence: + list = [ ] + part = data.split(self.vals) + for x in part: + list.append(int(x)) + return list else: return "" @@ -178,6 +184,13 @@ class configElement: return str(data); elif control == configBoolean: return str(data); + elif control == configSequence: + value = "" + for i in data: + if value !="": + value += self.vals + value += str(i) + return value else: return "" -- 2.30.2