Changeset 288 for etherws/trunk


Ignore:
Timestamp:
12/05/16 22:01:30 (8 years ago)
Author:
atzm
Message:
  • fix exception on tornado 4.x
File:
1 edited

Legend:

Unmodified
Added
Removed
  • etherws/trunk/etherws.py

    r287 r288  
    386386 
    387387        def auth_required(): 
    388             stream = getattr(self, 'stream', self.request.connection.stream) 
     388            stream = getattr(self, 'stream', None) 
     389            if stream is None: 
     390                stream = self.request.connection.stream 
     391 
    389392            stream.write(tornado.escape.utf8( 
    390393                'HTTP/1.1 401 Authorization Required\r\n' 
Note: See TracChangeset for help on using the changeset viewer.