git.cweiske.de
/
enigma2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2c10049
)
re-add web plugin
author
Felix Domke
<tmbinc@elitedvb.net>
Sun, 19 Feb 2006 22:36:17 +0000
(22:36 +0000)
committer
Felix Domke
<tmbinc@elitedvb.net>
Sun, 19 Feb 2006 22:36:17 +0000
(22:36 +0000)
lib/python/Plugins/web/plugin.py
patch
|
blob
|
history
diff --git
a/lib/python/Plugins/web/plugin.py
b/lib/python/Plugins/web/plugin.py
index e4c099bb5a91abaf0a06ab05008fe90d4e4e792d..1c40293afa1889c778112fe216f8e9a2e1c8eb9c 100644
(file)
--- 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 twisted.internet import reactor
from twisted.web2 import server, http, static
+from Plugins.Plugin import PluginDescriptor
-# this is currently not working
def startWebserver():
def startWebserver():
- print "Web startup"
toplevel = static.File("/hdd")
site = server.Site(toplevel)
reactor.listenTCP(80, http.HTTPFactory(site))
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():
def Plugins():
- return [ ]
+ return PluginDescriptor(where = PluginDescriptor.WHERE_AUTOSTART, fnc = autostart)