From a084ecfd463e1db01e877a3b1f0f502886cd4708 Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Sat, 8 Oct 2005 22:40:00 +0000 Subject: [PATCH] speed up satellites.xml-parsing --- lib/python/Components/NimManager.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index d806bc37..f91a4ea4 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -28,9 +28,8 @@ class NimManager: def readSatsfromFile(self): self.satellites = { } #FIXME: path ok??? - satfile = file('/etc/tuxbox/satellites.xml', 'r') - satdom = xml.dom.minidom.parseString(satfile.read()) - satfile.close() + satdom = xml.dom.minidom.parse('/etc/tuxbox/satellites.xml') + for entries in elementsWithTag(satdom.childNodes, "satellites"): for x in elementsWithTag(entries.childNodes, "sat"): -- 2.30.2