mirror of
https://github.com/django/daphne.git
synced 2025-02-16 16:30:33 +03:00
make travis install h2, and optionnal import PyOpenSSL
This commit is contained in:
parent
6e3c69eaf7
commit
0c9cd481f6
|
@ -5,5 +5,5 @@ python:
|
|||
- "3.5"
|
||||
install:
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then pip install unittest2; fi
|
||||
- pip install asgiref twisted autobahn
|
||||
- pip install asgiref twisted autobahn h2
|
||||
script: if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then python -m unittest2; else python -m unittest; fi
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import logging
|
||||
from twisted.internet import reactor, ssl, endpoints
|
||||
from OpenSSL import crypto
|
||||
|
||||
from .http_protocol import HTTPFactory
|
||||
|
||||
|
@ -49,6 +48,9 @@ class Server(object):
|
|||
)
|
||||
|
||||
if self.ssl_certificate :
|
||||
|
||||
from OpenSSL import crypto
|
||||
|
||||
with open(self.ssl_certificate, 'r') as f:
|
||||
cert = crypto.load_certificate(crypto.FILETYPE_PEM, f.read())
|
||||
with open(self.ssl_key, 'r') as f:
|
||||
|
|
Loading…
Reference in New Issue
Block a user