aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2008-07-11 12:23:16 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2008-07-11 12:23:16 +0000
commit51550aa81c726aedfa7159af0e67f8bcd5fb8a2f (patch)
tree5a98de59b25874170e5e66d6cb3e82be399b0ec7
parent64a7bd679d0a4a91699b8de9629b7c20de2fa5d7 (diff)
downloadenigma2-51550aa81c726aedfa7159af0e67f8bcd5fb8a2f.tar.gz
enigma2-51550aa81c726aedfa7159af0e67f8bcd5fb8a2f.zip
fix some imports
-rw-r--r--lib/python/Components/ChoiceList.py2
-rw-r--r--lib/python/Components/Converter/Streaming.py1
-rw-r--r--lib/python/Components/FileList.py7
-rw-r--r--lib/python/Components/MediaPlayer.py2
-rw-r--r--lib/python/Components/ParentalControlList.py2
-rw-r--r--lib/python/Components/PluginList.py2
-rw-r--r--lib/python/Components/UsageConfig.py2
-rw-r--r--lib/python/Plugins/Extensions/DVDBurn/TitleList.py2
-rw-r--r--lib/python/Plugins/Extensions/DVDPlayer/plugin.py7
-rw-r--r--lib/python/Plugins/Extensions/MediaPlayer/plugin.py4
-rw-r--r--lib/python/Plugins/SystemPlugins/VideoTune/VideoFinetune.py2
-rw-r--r--lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py12
-rw-r--r--lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py7
-rw-r--r--lib/python/Screens/ChannelSelection.py1
-rw-r--r--lib/python/Screens/DefaultWizard.py18
-rw-r--r--lib/python/Screens/InfoBar.py2
-rw-r--r--lib/python/Screens/InfoBarGenerics.py4
-rw-r--r--lib/python/Screens/LocationBox.py3
-rw-r--r--lib/python/Screens/Satconfig.py2
-rw-r--r--lib/python/Screens/Screen.py2
-rw-r--r--lib/python/Screens/Setup.py4
-rw-r--r--lib/python/Screens/TimerEntry.py28
-rw-r--r--mytest.py4
-rw-r--r--skin.py4
24 files changed, 47 insertions, 77 deletions
diff --git a/lib/python/Components/ChoiceList.py b/lib/python/Components/ChoiceList.py
index 16778749..fe505c2a 100644
--- a/lib/python/Components/ChoiceList.py
+++ b/lib/python/Components/ChoiceList.py
@@ -1,6 +1,6 @@
from MenuList import MenuList
from Tools.Directories import SCOPE_SKIN_IMAGE, resolveFilename
-from enigma import RT_HALIGN_LEFT, eListboxPythonMultiContent, eListbox, gFont
+from enigma import RT_HALIGN_LEFT, eListboxPythonMultiContent, gFont
from Tools.LoadPixmap import LoadPixmap
def ChoiceEntryComponent(key, text):
diff --git a/lib/python/Components/Converter/Streaming.py b/lib/python/Components/Converter/Streaming.py
index f12ebd99..2746ee84 100644
--- a/lib/python/Components/Converter/Streaming.py
+++ b/lib/python/Components/Converter/Streaming.py
@@ -23,7 +23,6 @@ class Streaming(Converter):
if s is None:
err = service.getError()
- from enigma import iRecordableService
if err:
return "-SERVICE ERROR:%d\n" % err
else:
diff --git a/lib/python/Components/FileList.py b/lib/python/Components/FileList.py
index 54106fba..889df629 100644
--- a/lib/python/Components/FileList.py
+++ b/lib/python/Components/FileList.py
@@ -1,12 +1,11 @@
-import re
-
+from re import compile as re_compile
from os import path as os_path, listdir
from MenuList import MenuList
from Components.Harddisk import harddiskmanager
from Tools.Directories import SCOPE_SKIN_IMAGE, resolveFilename
-from enigma import RT_HALIGN_LEFT, eListbox, eListboxPythonMultiContent, \
+from enigma import RT_HALIGN_LEFT, eListboxPythonMultiContent, \
eServiceReference, eServiceCenter, gFont
from Tools.LoadPixmap import LoadPixmap
@@ -184,7 +183,7 @@ class FileList(MenuList):
path = directory + x
name = x
- if (self.matchingPattern is None) or re.compile(self.matchingPattern).search(path):
+ if (self.matchingPattern is None) or re_compile(self.matchingPattern).search(path):
self.list.append(FileEntryComponent(name = name, absolute = x , isDir = False))
self.l.setList(self.list)
diff --git a/lib/python/Components/MediaPlayer.py b/lib/python/Components/MediaPlayer.py
index ef8d3a41..84f7bec7 100644
--- a/lib/python/Components/MediaPlayer.py
+++ b/lib/python/Components/MediaPlayer.py
@@ -3,7 +3,7 @@ from MenuList import MenuList
from Tools.Directories import SCOPE_SKIN_IMAGE, resolveFilename
from os import path
-from enigma import eListboxPythonMultiContent, eListbox, RT_VALIGN_CENTER, gFont, eServiceCenter
+from enigma import eListboxPythonMultiContent, RT_VALIGN_CENTER, gFont, eServiceCenter
from Tools.LoadPixmap import LoadPixmap
diff --git a/lib/python/Components/ParentalControlList.py b/lib/python/Components/ParentalControlList.py
index 31483865..71912620 100644
--- a/lib/python/Components/ParentalControlList.py
+++ b/lib/python/Components/ParentalControlList.py
@@ -2,7 +2,7 @@ from MenuList import MenuList
from Components.ParentalControl import parentalControl
from Tools.Directories import SCOPE_SKIN_IMAGE, resolveFilename
-from enigma import eListbox, eListboxPythonMultiContent, gFont, RT_HALIGN_LEFT
+from enigma import eListboxPythonMultiContent, gFont, RT_HALIGN_LEFT
from Tools.LoadPixmap import LoadPixmap
lockPicture = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/lock.png"))
diff --git a/lib/python/Components/PluginList.py b/lib/python/Components/PluginList.py
index 6d6f2d00..63136cce 100644
--- a/lib/python/Components/PluginList.py
+++ b/lib/python/Components/PluginList.py
@@ -3,7 +3,7 @@ from MenuList import MenuList
from Tools.Directories import resolveFilename, SCOPE_SKIN_IMAGE
from Components.MultiContent import MultiContentEntryText, MultiContentEntryPixmapAlphaTest
-from enigma import eListboxPythonMultiContent, eListbox, gFont
+from enigma import eListboxPythonMultiContent, gFont
from Tools.LoadPixmap import LoadPixmap
def PluginEntryComponent(plugin):
diff --git a/lib/python/Components/UsageConfig.py b/lib/python/Components/UsageConfig.py
index cfdb4589..269d5a2c 100644
--- a/lib/python/Components/UsageConfig.py
+++ b/lib/python/Components/UsageConfig.py
@@ -1,4 +1,4 @@
-from config import ConfigSubsection, ConfigYesNo, config, ConfigSelection, ConfigText, ConfigNumber, ConfigSet, ConfigNothing
+from config import ConfigSubsection, ConfigYesNo, config, ConfigSelection, ConfigText, ConfigNumber, ConfigSet
from enigma import Misc_Options, setTunerTypePriorityOrder;
from SystemInfo import SystemInfo
import os
diff --git a/lib/python/Plugins/Extensions/DVDBurn/TitleList.py b/lib/python/Plugins/Extensions/DVDBurn/TitleList.py
index efbab91a..99344e46 100644
--- a/lib/python/Plugins/Extensions/DVDBurn/TitleList.py
+++ b/lib/python/Plugins/Extensions/DVDBurn/TitleList.py
@@ -1,4 +1,4 @@
-import DVDProject, DVDTitle, TitleList, TitleCutter
+import DVDProject, TitleList, TitleCutter
from Screens.Screen import Screen
from Components.ActionMap import HelpableActionMap, ActionMap
diff --git a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py
index 0db850a4..8e9031d7 100644
--- a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py
+++ b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py
@@ -1,10 +1,8 @@
from os import path as os_path, remove as os_remove, listdir as os_listdir, system
-from time import strftime
-from enigma import eTimer, iPlayableService, eServiceCenter, iServiceInformation, eServiceReference, iServiceKeys
+from enigma import eTimer, iPlayableService, iServiceInformation, eServiceReference, iServiceKeys
from Screens.Screen import Screen
from Screens.MessageBox import MessageBox
from Screens.ChoiceBox import ChoiceBox
-from Screens.InputBox import InputBox
from Screens.HelpMenu import HelpableScreen
from Screens.InfoBarGenerics import InfoBarSeek, InfoBarPVRState, InfoBarCueSheetSupport, InfoBarShowHide, InfoBarNotifications
from Components.ActionMap import ActionMap, NumberActionMap, HelpableActionMap
@@ -12,11 +10,8 @@ from Components.Label import Label
from Components.FileList import FileList
from Components.ServiceEventTracker import ServiceEventTracker, InfoBarBase
from Components.config import config
-from Components.ProgressBar import ProgressBar
-from ServiceReference import ServiceReference
from Tools.Directories import pathExists, fileExists
-import random
import servicedvd # load c++ part of dvd player plugin
lastpath = ""
diff --git a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py
index bca85518..267ada1c 100644
--- a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py
+++ b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py
@@ -1,6 +1,6 @@
from os import path as os_path, remove as os_remove, listdir as os_listdir
from time import strftime
-from enigma import eTimer, iPlayableService, eServiceCenter, iServiceInformation
+from enigma import eTimer, eServiceCenter, iServiceInformation
from Screens.Screen import Screen
from Screens.MessageBox import MessageBox
from Screens.InputBox import InputBox
@@ -12,7 +12,7 @@ from Components.FileList import FileList
from Components.MediaPlayer import PlayList
from Tools.Directories import resolveFilename, SCOPE_CONFIG, SCOPE_PLAYLIST, SCOPE_SKIN_IMAGE
from Components.ServicePosition import ServicePositionGauge
-from Components.ServiceEventTracker import ServiceEventTracker, InfoBarBase
+from Components.ServiceEventTracker import InfoBarBase
from Components.Playlist import PlaylistIOInternal, PlaylistIOM3U, PlaylistIOPLS
from Screens.InfoBarGenerics import InfoBarSeek, InfoBarAudioSelection, InfoBarCueSheetSupport, InfoBarNotifications
from ServiceReference import ServiceReference
diff --git a/lib/python/Plugins/SystemPlugins/VideoTune/VideoFinetune.py b/lib/python/Plugins/SystemPlugins/VideoTune/VideoFinetune.py
index 11e14d36..d27e84f9 100644
--- a/lib/python/Plugins/SystemPlugins/VideoTune/VideoFinetune.py
+++ b/lib/python/Plugins/SystemPlugins/VideoTune/VideoFinetune.py
@@ -2,7 +2,7 @@ from Screens.Screen import Screen
from Components.Sources.CanvasSource import CanvasSource
from Components.ActionMap import ActionMap
from enigma import gFont
-from enigma import RT_HALIGN_LEFT, RT_HALIGN_RIGHT, RT_VALIGN_CENTER, RT_WRAP
+from enigma import RT_HALIGN_RIGHT, RT_WRAP
def RGB(r,g,b):
return (r<<16)|(g<<8)|b
diff --git a/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py b/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
index a10d9394..dee1b0d2 100644
--- a/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
+++ b/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
@@ -1,15 +1,5 @@
-from Screens.Screen import Screen
-from Plugins.Plugin import PluginDescriptor
-
from enigma import eTimer
-
-from Components.ActionMap import ActionMap
-from Components.Label import Label
-from Components.Pixmap import Pixmap
-from Screens.MessageBox import MessageBox
-from Screens.Setup import SetupSummary
-from Components.ConfigList import ConfigListScreen
-from Components.config import getConfigListEntry, config, ConfigSelection, ConfigSubDict, ConfigYesNo
+from Components.config import config, ConfigSelection, ConfigSubDict, ConfigYesNo
from Tools.CList import CList
diff --git a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py
index ae337ef1..5eef8cda 100644
--- a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py
+++ b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py
@@ -1,14 +1,11 @@
-from Screens.Wizard import wizardManager, WizardSummary
+from Screens.Wizard import WizardSummary
from Screens.WizardLanguage import WizardLanguage
-import sys
from VideoHardware import video_hw
from Components.Pixmap import Pixmap, MovingPixmap
from Components.config import config, ConfigBoolean, configfile
-from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_SKIN_IMAGE
-from enigma import eListboxPythonMultiContent, gFont, RT_HALIGN_LEFT
-from Tools.LoadPixmap import LoadPixmap
+from Tools.Directories import resolveFilename, SCOPE_PLUGINS
config.misc.showtestcard = ConfigBoolean(default = False)
diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py
index 2fd3bd8b..b203b24e 100644
--- a/lib/python/Screens/ChannelSelection.py
+++ b/lib/python/Screens/ChannelSelection.py
@@ -21,7 +21,6 @@ profile("ChannelSelection.py 2.3")
from Components.Input import Input
profile("ChannelSelection.py 3")
from Components.ParentalControl import parentalControl
-from Components.Pixmap import Pixmap
from Screens.InputBox import InputBox, PinInput
from Screens.MessageBox import MessageBox
from Screens.ServiceInfo import ServiceInfo
diff --git a/lib/python/Screens/DefaultWizard.py b/lib/python/Screens/DefaultWizard.py
index 79c68f65..ec45a28f 100644
--- a/lib/python/Screens/DefaultWizard.py
+++ b/lib/python/Screens/DefaultWizard.py
@@ -1,18 +1,16 @@
from Wizard import wizardManager
from Screens.WizardLanguage import WizardLanguage
-from Tools.Directories import crawlDirectory, resolveFilename, SCOPE_DEFAULTDIR, SCOPE_DEFAULTPARTITIONMOUNTDIR, SCOPE_DEFAULTPARTITION
+from Tools.Directories import resolveFilename, SCOPE_DEFAULTDIR, SCOPE_DEFAULTPARTITIONMOUNTDIR, SCOPE_DEFAULTPARTITION
from Components.Pixmap import Pixmap, MovingPixmap
from Components.config import config, ConfigBoolean, configfile, ConfigYesNo, getConfigListEntry
-from Components.DreamInfoHandler import DreamInfoHandler, InfoHandler, InfoHandlerParseError
+from Components.DreamInfoHandler import DreamInfoHandler
from Components.PluginComponent import plugins
from Plugins.Plugin import PluginDescriptor
-import os
+from os import system as os_system, path as os_path
config.misc.defaultchosen = ConfigBoolean(default = True)
-import xml.sax
-
class DefaultWizard(WizardLanguage, DreamInfoHandler):
def __init__(self, session, silent = True, showSteps = False, neededTag = None):
DreamInfoHandler.__init__(self, self.statusCallback, neededTag = neededTag)
@@ -27,7 +25,7 @@ class DefaultWizard(WizardLanguage, DreamInfoHandler):
self["arrowup2"] = MovingPixmap()
def setDirectory(self):
- os.system("mount %s %s" % (resolveFilename(SCOPE_DEFAULTPARTITION), resolveFilename(SCOPE_DEFAULTPARTITIONMOUNTDIR)))
+ os_system("mount %s %s" % (resolveFilename(SCOPE_DEFAULTPARTITION), resolveFilename(SCOPE_DEFAULTPARTITIONMOUNTDIR)))
self.directory = resolveFilename(SCOPE_DEFAULTPARTITIONMOUNTDIR)
self.xmlfile = "defaultwizard.xml"
@@ -64,8 +62,8 @@ class DefaultWizard(WizardLanguage, DreamInfoHandler):
class DreamPackageWizard(DefaultWizard):
def __init__(self, session, packagefile, silent = False):
- os.system("mkdir /tmp/package")
- os.system("tar xpzf %s -C /tmp/package" % packagefile)
+ os_system("mkdir /tmp/package")
+ os_system("tar xpzf %s -C /tmp/package" % packagefile)
self.packagefile = packagefile
DefaultWizard.__init__(self, session, silent)
@@ -85,13 +83,13 @@ class ImageDefaultInstaller(DreamInfoHandler):
def install(choice):
if choice is not None:
- #os.system("mkdir /tmp/package && tar xpzf %s ")
+ #os_system("mkdir /tmp/package && tar xpzf %s ")
choice[2].open(DreamPackageWizard, choice[1])
def filescan_open(list, session, **kwargs):
from Screens.ChoiceBox import ChoiceBox
print "open default wizard"
- filelist = [(os.path.split(x.path)[1], x.path, session) for x in list]
+ filelist = [(os_path.split(x.path)[1], x.path, session) for x in list]
print filelist
session.openWithCallback(install, ChoiceBox, title = _("Please choose he package..."), list=filelist)
diff --git a/lib/python/Screens/InfoBar.py b/lib/python/Screens/InfoBar.py
index 05c5c98a..41df2475 100644
--- a/lib/python/Screens/InfoBar.py
+++ b/lib/python/Screens/InfoBar.py
@@ -1,4 +1,4 @@
-from Tools.Profile import profile, profile_final
+from Tools.Profile import profile
from Screen import Screen
diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py
index 3a735dec..81a776f9 100644
--- a/lib/python/Screens/InfoBarGenerics.py
+++ b/lib/python/Screens/InfoBarGenerics.py
@@ -2,11 +2,9 @@ from ChannelSelection import ChannelSelection, BouquetSelector
from Components.ActionMap import ActionMap, HelpableActionMap
from Components.ActionMap import NumberActionMap
-from Components.BlinkingPixmap import BlinkingPixmapConditional
from Components.Harddisk import harddiskmanager
from Components.Input import Input
from Components.Label import Label
-from Components.Pixmap import Pixmap
from Components.PluginComponent import plugins
from Components.ServiceEventTracker import ServiceEventTracker
from Components.Sources.Boolean import Boolean
@@ -34,7 +32,7 @@ from Tools import Notifications
from Tools.Directories import SCOPE_HDD, resolveFilename, pathExists
from enigma import eTimer, eServiceCenter, eDVBServicePMTHandler, iServiceInformation, \
- iPlayableService, eServiceReference, eDVBResourceManager, iFrontendInformation, eEPGCache
+ iPlayableService, eServiceReference, eEPGCache
from time import time, localtime, strftime
from os import stat as os_stat
diff --git a/lib/python/Screens/LocationBox.py b/lib/python/Screens/LocationBox.py
index 6d360339..e41601a9 100644
--- a/lib/python/Screens/LocationBox.py
+++ b/lib/python/Screens/LocationBox.py
@@ -12,8 +12,7 @@ from Screens.ChoiceBox import ChoiceBox
# Generic
from Tools.BoundFunction import boundFunction
from Tools.Directories import *
-from Components.config import config, configfile, ConfigSubList, ConfigSubsection, \
- ConfigText, ConfigNumber, ConfigBoolean
+from Components.config import config
import os
# Quickselect
diff --git a/lib/python/Screens/Satconfig.py b/lib/python/Screens/Satconfig.py
index 3aabc0e1..40bf7046 100644
--- a/lib/python/Screens/Satconfig.py
+++ b/lib/python/Screens/Satconfig.py
@@ -4,7 +4,7 @@ from Components.SystemInfo import SystemInfo
from Components.ActionMap import ActionMap
from Components.ConfigList import ConfigListScreen
from Components.MenuList import MenuList
-from Components.NimManager import nimmanager, InitNimManager
+from Components.NimManager import nimmanager
from Components.config import getConfigListEntry, config, ConfigNothing, ConfigSelection, updateConfigElement
from Screens.MessageBox import MessageBox
diff --git a/lib/python/Screens/Screen.py b/lib/python/Screens/Screen.py
index 287847ba..2ba7342f 100644
--- a/lib/python/Screens/Screen.py
+++ b/lib/python/Screens/Screen.py
@@ -1,4 +1,4 @@
-from Tools.Profile import profile, profile_final
+from Tools.Profile import profile
profile("LOAD:GUISkin")
from Components.GUISkin import GUISkin
diff --git a/lib/python/Screens/Setup.py b/lib/python/Screens/Setup.py
index f352e8cb..3ff0b76e 100644
--- a/lib/python/Screens/Setup.py
+++ b/lib/python/Screens/Setup.py
@@ -7,8 +7,6 @@ from Components.Label import Label
from Components.Pixmap import Pixmap
import xml.dom.minidom
-from skin import elementsWithTag
-
from Tools import XMLTools
# FIXME: use resolveFile!
@@ -151,7 +149,7 @@ class Setup(ConfigListScreen, Screen):
def getSetupTitle(id):
xmldata = setupdom.childNodes[0].childNodes
- for x in elementsWithTag(xmldata, "setup"):
+ for x in XMLTools.elementsWithTag(xmldata, "setup"):
if x.getAttribute("key") == id:
return x.getAttribute("title").encode("UTF-8")
raise "unknown setup id '%s'!" % repr(id)
diff --git a/lib/python/Screens/TimerEntry.py b/lib/python/Screens/TimerEntry.py
index ca1a3929..31a65a30 100644
--- a/lib/python/Screens/TimerEntry.py
+++ b/lib/python/Screens/TimerEntry.py
@@ -8,15 +8,13 @@ from Components.MenuList import MenuList
from Components.Button import Button
from Components.Label import Label
from Components.Pixmap import Pixmap
-from Components.SelectionList import SelectionList, SelectionEntryComponent
-from Components.MovieList import MovieList
from Screens.LocationBox import MovieLocationBox
from Screens.ChoiceBox import ChoiceBox
from RecordTimer import AFTEREVENT
from Tools.Directories import resolveFilename, SCOPE_HDD
-from enigma import eEPGCache, eServiceReference
-import time
-import datetime
+from enigma import eEPGCache
+from time import localtime, mktime, time, strftime
+from datetime import datetime
class TimerEntry(Screen, ConfigListScreen):
def __init__(self, session, timer):
@@ -82,7 +80,7 @@ class TimerEntry(Screen, ConfigListScreen):
else: # once
type = "once"
repeated = None
- weekday = (int(time.strftime("%w", time.localtime(self.timer.begin))) - 1) % 7
+ weekday = (int(strftime("%w", localtime(self.timer.begin))) - 1) % 7
day[weekday] = 1
self.timerentry_justplay = ConfigSelection(choices = [("zap", _("zap")), ("record", _("record"))], default = {0: "record", 1: "zap"}[justplay])
@@ -247,14 +245,14 @@ class TimerEntry(Screen, ConfigListScreen):
self["config"].invalidate(self.channelEntry)
def getTimestamp(self, date, mytime):
- d = time.localtime(date)
- dt = datetime.datetime(d.tm_year, d.tm_mon, d.tm_mday, mytime[0], mytime[1])
- return int(time.mktime(dt.timetuple()))
+ d = localtime(date)
+ dt = datetime(d.tm_year, d.tm_mon, d.tm_mday, mytime[0], mytime[1])
+ return int(mktime(dt.timetuple()))
def buildRepeatedBegin(self, rep_time, start_time):
- d = time.localtime(rep_time)
- dt = datetime.datetime(d.tm_year, d.tm_mon, d.tm_mday, start_time[0], start_time[1])
- return int(time.mktime(dt.timetuple()))
+ d = localtime(rep_time)
+ dt = datetime(d.tm_year, d.tm_mon, d.tm_mday, start_time[0], start_time[1])
+ return int(mktime(dt.timetuple()))
def getBeginEnd(self):
enddate = self.timerentry_enddate.value
@@ -305,8 +303,8 @@ class TimerEntry(Screen, ConfigListScreen):
self.timer.setRepeated(x)
self.timer.repeatedbegindate = self.buildRepeatedBegin(self.timerentry_repeatedbegindate.value, self.timerentry_starttime.value)
- self.timer.begin = self.getTimestamp(time.time(), self.timerentry_starttime.value)
- self.timer.end = self.getTimestamp(time.time(), self.timerentry_endtime.value)
+ self.timer.begin = self.getTimestamp(time(), self.timerentry_starttime.value)
+ self.timer.end = self.getTimestamp(time(), self.timerentry_endtime.value)
# when a timer end is set before the start, add 1 day
if self.timer.end < self.timer.begin:
@@ -392,7 +390,7 @@ class TimerLog(Screen):
def fillLogList(self):
self.list = [ ]
for x in self.log_entries:
- self.list.append((str(time.strftime("%Y-%m-%d %H-%M", time.localtime(x[0])) + " - " + x[2]), x))
+ self.list.append((str(strftime("%Y-%m-%d %H-%M", localtime(x[0])) + " - " + x[2]), x))
def clearLog(self):
self.log_entries = []
diff --git a/mytest.py b/mytest.py
index d58649cf..8c900c18 100644
--- a/mytest.py
+++ b/mytest.py
@@ -36,11 +36,11 @@ profile("LOAD:Navigation")
from Navigation import Navigation
profile("LOAD:skin")
-from skin import readSkin, applyAllAttributes
+from skin import readSkin
profile("LOAD:Tools")
from Tools.Directories import InitFallbackFiles, resolveFilename, SCOPE_PLUGINS, SCOPE_SKIN_IMAGE
-from Components.config import config, configfile, ConfigText, ConfigSubsection, ConfigInteger
+from Components.config import config, configfile, ConfigText
InitFallbackFiles()
profile("ReloadProfiles")
diff --git a/skin.py b/skin.py
index a7824f91..97954715 100644
--- a/skin.py
+++ b/skin.py
@@ -1,4 +1,4 @@
-from Tools.Profile import profile, profile_final
+from Tools.Profile import profile
profile("LOAD:ElementTree")
import xml.etree.cElementTree
from os import path
@@ -14,7 +14,7 @@ from Tools.Directories import resolveFilename, SCOPE_SKIN, SCOPE_SKIN_IMAGE, SCO
from Tools.Import import my_import
from Tools.LoadPixmap import LoadPixmap
-from Tools.XMLTools import elementsWithTag, mergeText
+from Tools.XMLTools import mergeText
colorNames = dict()