aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins/SystemPlugins/OldSoftwareUpdate
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-12-19 02:12:57 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-12-19 02:12:57 +0000
commited40f6f85c9c07c3c1224ae20601082c0309a631 (patch)
tree4082515a3e85107bd4a278b6613857b58da1770f /lib/python/Plugins/SystemPlugins/OldSoftwareUpdate
parentb3658b04216ed3974047b4c4ec885ee0161d9267 (diff)
downloadenigma2-ed40f6f85c9c07c3c1224ae20601082c0309a631.tar.gz
enigma2-ed40f6f85c9c07c3c1224ae20601082c0309a631.zip
some python import cleanups
lesser swig overhead
Diffstat (limited to 'lib/python/Plugins/SystemPlugins/OldSoftwareUpdate')
-rw-r--r--lib/python/Plugins/SystemPlugins/OldSoftwareUpdate/plugin.py21
1 files changed, 6 insertions, 15 deletions
diff --git a/lib/python/Plugins/SystemPlugins/OldSoftwareUpdate/plugin.py b/lib/python/Plugins/SystemPlugins/OldSoftwareUpdate/plugin.py
index 72279c1a..0f6c4e84 100644
--- a/lib/python/Plugins/SystemPlugins/OldSoftwareUpdate/plugin.py
+++ b/lib/python/Plugins/SystemPlugins/OldSoftwareUpdate/plugin.py
@@ -1,4 +1,4 @@
-from enigma import *
+from enigma import RT_HALIGN_LEFT, RT_VALIGN_CENTER, eListboxPythonMultiContent, eListbox, eTimer, gFont
from Screens.Screen import Screen
from Screens.MessageBox import MessageBox
from Components.ActionMap import ActionMap, NumberActionMap
@@ -10,7 +10,7 @@ from Components.Input import Input
from Screens.Console import Console
from Plugins.Plugin import PluginDescriptor
-import os
+from os import popen
class Upgrade(Screen):
skin = """
@@ -43,7 +43,7 @@ class Upgrade(Screen):
self.close()
def doUpdateDelay(self):
- lines = os.popen("ipkg update && ipkg upgrade -force-defaults -force-overwrite", "r").readlines()
+ lines = popen("ipkg update && ipkg upgrade -force-defaults -force-overwrite", "r").readlines()
string = ""
for x in lines:
string += x
@@ -58,15 +58,6 @@ class Upgrade(Screen):
else:
self.close()
-RT_HALIGN_LEFT = 0
-RT_HALIGN_RIGHT = 1
-RT_HALIGN_CENTER = 2
-RT_HALIGN_BLOCK = 4
-
-RT_VALIGN_TOP = 0
-RT_VALIGN_CENTER = 8
-RT_VALIGN_BOTTOM = 16
-
def PacketEntryComponent(packet):
res = [ packet ]
@@ -122,13 +113,13 @@ class Ipkg(Screen):
def fillPacketList(self):
- lines = os.popen("ipkg list", "r").readlines()
+ lines = popen("ipkg list", "r").readlines()
packetlist = []
for x in lines:
split = x.split(' - ')
packetlist.append([split[0].strip(), split[1].strip()])
- lines = os.popen("ipkg list_installed", "r").readlines()
+ lines = popen("ipkg list_installed", "r").readlines()
installedlist = {}
for x in lines:
@@ -151,7 +142,7 @@ class Ipkg(Screen):
self.close()
def doUpdateDelay(self):
- lines = os.popen("ipkg update && ipkg upgrade", "r").readlines()
+ lines = popen("ipkg update && ipkg upgrade", "r").readlines()
string = ""
for x in lines:
string += x