Make catching the SSL exception due to old Twisted version more specific.

This commit is contained in:
Daniel Wróbel 2019-02-24 17:50:15 +01:00
parent 30c8cbbc08
commit 75416463a6

View File

@ -230,7 +230,7 @@ class SyncFactory(Factory):
contextFactory = ssl.CertificateOptions(privateKey=privKeyPySSL, certificate=certifPySSL,
extraCertChain=chainPySSL, acceptableCiphers=accCiphers,
raiseMinimumTo=ssl.TLSVersion.TLSv1_2)
except:
except AttributeError:
contextFactory = ssl.CertificateOptions(privateKey=privKeyPySSL, certificate=certifPySSL,
extraCertChain=chainPySSL, acceptableCiphers=accCiphers,
method=TLSv1_2_METHOD)