Skip to content

Commit

Permalink
Merge pull request #10 from jbms/fix-tornado6
Browse files Browse the repository at this point in the history
fix: Fix compatibility with Tornado 6.0
  • Loading branch information
jbms committed Mar 3, 2019
2 parents 178620d + 23861ac commit 98b1939
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion beancount_import/webserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,12 @@ def post(self):
class WebSocketHandler(tornado.websocket.WebSocketHandler):
def open(self, *args):
self.application.socket_clients.add(self)
self.set_nodelay(True)
try:
self.set_nodelay(True)
except:
# This results in an assertion error in Tornado 6.0. Simply ignore
# it since the nodelay option isn't critical.
pass
self.prev_state = dict()
self.prev_state_generation = dict()
self.watched_files = set()
Expand Down

0 comments on commit 98b1939

Please sign in to comment.