← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~raoul-snyman/openlp/bug-1206886-2.0 into lp:openlp/2.0

 

Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/bug-1206886-2.0 into lp:openlp/2.0.

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  Bug #1206886 in OpenLP: "HTTP Server gets deleted"
  https://bugs.launchpad.net/openlp/+bug/1206886

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/bug-1206886-2.0/+merge/199909

Fix bug #1206886: only write to the socket if it exists
-- 
https://code.launchpad.net/~raoul-snyman/openlp/bug-1206886-2.0/+merge/199909
Your team OpenLP Core is requested to review the proposed merge of lp:~raoul-snyman/openlp/bug-1206886-2.0 into lp:openlp/2.0.
=== modified file 'openlp/plugins/bibles/lib/db.py'
--- openlp/plugins/bibles/lib/db.py	2013-08-21 12:47:32 +0000
+++ openlp/plugins/bibles/lib/db.py	2013-12-21 23:50:37 +0000
@@ -1061,7 +1061,7 @@
         QtCore.QObject.__init__(self)
         if u'path' not in kwargs:
             raise KeyError(u'Missing keyword argument "path".')
-        if  u'file' not in kwargs:
+        if u'file' not in kwargs:
             raise KeyError(u'Missing keyword argument "file".')
         if u'path' in kwargs:
             self.path = kwargs[u'path']

=== modified file 'openlp/plugins/remotes/lib/httpserver.py'
--- openlp/plugins/remotes/lib/httpserver.py	2012-12-30 19:41:24 +0000
+++ openlp/plugins/remotes/lib/httpserver.py	2013-12-21 23:50:37 +0000
@@ -593,8 +593,11 @@
         for header, value in response.headers.iteritems():
             http += '%s: %s\r\n' % (header, value)
         http += '\r\n'
-        self.socket.write(http)
-        self.socket.write(response.content)
+        if self.socket:
+            # Write to the socket if it's open, else ignore it.
+            # See http://support.openlp.org/scp/tickets.php?id=2112
+            self.socket.write(http)
+            self.socket.write(response.content)
 
     def disconnected(self):
         """


Follow ups