From 0b37e80614fabb8ade419972d93c1115d13a365d Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Sun, 28 Aug 2016 11:14:13 -0700 Subject: [PATCH] Add attribute check for #31 and remove version pin --- daphne/http_protocol.py | 6 +++--- setup.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/daphne/http_protocol.py b/daphne/http_protocol.py index 867a834..87281fa 100755 --- a/daphne/http_protocol.py +++ b/daphne/http_protocol.py @@ -110,9 +110,9 @@ class WebRequest(http.Request): logger.debug("Connection %s did not get successful WS handshake.", self.reply_channel) del self.factory.reply_protocols[self.reply_channel] self.reply_channel = None - - # Resume the producer so we keep getting data - self.channel.resumeProducing() + # Resume the producer so we keep getting data, if it's available as a method + if hasattr(self.channel, "resumeProducing"): + self.channel.resumeProducing() # Boring old HTTP. else: diff --git a/setup.py b/setup.py index 5576dc6..39ca85a 100755 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ setup( include_package_data=True, install_requires=[ 'asgiref>=0.13', - 'twisted>=15.5,<16.3', + 'twisted>=16.0', 'autobahn>=0.12', ], entry_points={'console_scripts': [