Skip to content
Permalink
Browse files

solved conflict

  • Loading branch information...
ralsina committed Aug 5, 2015
2 parents ab3a8e9 + 046bc8f commit 4a5a677554b30f2019f24101f2c7dcb4a7567c66
Showing with 23 additions and 1 deletion.
  1. +2 −0 CHANGES.txt
  2. +21 −1 nikola/plugins/command/auto/__init__.py
@@ -10,6 +10,7 @@ Bugfixes
--------

* Handle special characters in URLs in nikola auto (Issue #1925)
* Avoid Broken Pipe error in nikola auto (Issue #1906)
* "nikola auto" serving implicit index.html with wrong mime type (Issue #1921)
* Handle non-integer shutter speeds and other variables in WordPress
importer (Issue #1917)
@@ -29,6 +30,7 @@ Features
Bugfixes
--------

* Don't auto-rebuild on changes to ".foo" or "foo~" or changes in folders.
* Don't assume things are HTML in auto mode (Issue #1915)
* Don’t rebuild Atom syndication files unnecessarily often
* Include .php files in sitemaps
@@ -33,6 +33,7 @@
import os
import re
import subprocess
import sys
import time
try:
from urlparse import urlparse
@@ -46,7 +47,7 @@
from blinker import signal
try:
from ws4py.websocket import WebSocket
from ws4py.server.wsgirefserver import WSGIServer, WebSocketWSGIRequestHandler
from ws4py.server.wsgirefserver import WSGIServer, WebSocketWSGIRequestHandler, WebSocketWSGIHandler
from ws4py.server.wsgiutils import WebSocketWSGIApplication
from ws4py.messaging import TextMessage
except ImportError:
@@ -419,3 +420,22 @@ def on_any_event(self, event):
"""Call the provided function on any event."""
if event._src_path == self.configuration_filename:
self.function(event)


# Monkeypatch to hide Broken Pipe Errors

f = WebSocketWSGIHandler.finish_response

if sys.version_info[0] == 3:
EX = BrokenPipeError # NOQA
else:
EX = IOError


def finish_response(self):
try:
f(self)
except EX: # Client closed the connection, not a real error
pass

WebSocketWSGIHandler.finish_response = finish_response

0 comments on commit 4a5a677

Please sign in to comment.
You can’t perform that action at this time.