aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2006-02-19 22:36:17 +0000
committerFelix Domke <tmbinc@elitedvb.net>2006-02-19 22:36:17 +0000
commit2164297221bc9611a0f5a039b34c6850137773a6 (patch)
tree5f42f89bfd7b6edec4f8cf0537794a5d4d798cf6 /lib/python
parent2c10049e10195f88b1eefec26f70f5019d316cc8 (diff)
downloadenigma2-2164297221bc9611a0f5a039b34c6850137773a6.tar.gz
enigma2-2164297221bc9611a0f5a039b34c6850137773a6.zip
re-add web plugin
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Plugins/web/plugin.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/python/Plugins/web/plugin.py b/lib/python/Plugins/web/plugin.py
index e4c099bb..1c40293a 100644
--- a/lib/python/Plugins/web/plugin.py
+++ b/lib/python/Plugins/web/plugin.py
@@ -1,13 +1,19 @@
from twisted.internet import reactor
from twisted.web2 import server, http, static
+from Plugins.Plugin import PluginDescriptor
-# this is currently not working
def startWebserver():
- print "Web startup"
toplevel = static.File("/hdd")
site = server.Site(toplevel)
reactor.listenTCP(80, http.HTTPFactory(site))
+def autostart(reason):
+ if reason == 0:
+ try:
+ startWebserver()
+ except ImportError:
+ print "twisted not available, not starting web services"
+
def Plugins():
- return [ ]
+ return PluginDescriptor(where = PluginDescriptor.WHERE_AUTOSTART, fnc = autostart)