A Python UPnP Media Server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
545 B

  1. # Licensed under the MIT license
  2. # http://opensource.org/licenses/mit-license.php
  3. # Copyright 2005, Tim Potter <tpot@samba.org>
  4. from twisted.web import soap
  5. import SOAPpy
  6. class UPnPPublisher(soap.SOAPPublisher):
  7. """UPnP requires OUT parameters to be returned in a slightly
  8. different way than the SOAPPublisher class does."""
  9. def _gotResult(self, result, request, methodName):
  10. response = SOAPpy.buildSOAP(kw=result,
  11. encoding=self.encoding)
  12. self._sendResponse(request, response)