1 from twisted.web2 import resource, responsecode, http
2 from EPGRefresh import epgrefresh
4 # pretty basic resource which is just present to have a way to start a
5 # forced refresh through the webif
6 class EPGRefreshResource(resource.Resource):
8 resource.Resource.__init__(self)
10 def render(self, req):
11 if req.args.has_key("refresh"):
12 if epgrefresh.forceRefresh():
13 output = "initiated refresh"
15 output = "could not initiate refresh"
17 output = "unknown command"
18 return http.Response(responsecode.OK, stream = output)