Drop certificateerror.create factory function
Now that the two implementations are in the same class, there's no need
for the indirection anymore.
Follow-up to 647b74197a.
This commit is contained in:
parent
91672cc822
commit
74027d3395
|
|
@ -79,8 +79,3 @@ class CertificateErrorWrapper(usertypes.AbstractCertificateErrorWrapper):
|
|||
# WORKAROUND for https://www.riverbankcomputing.com/pipermail/pyqt/2022-April/044585.html
|
||||
# (PyQt 5.15.6, 6.2.3, 6.3.0)
|
||||
raise usertypes.UndeferrableError("PyQt bug")
|
||||
|
||||
|
||||
def create(error: QWebEngineCertificateError) -> CertificateErrorWrapper:
|
||||
"""Factory function picking the right class based on Qt version."""
|
||||
return CertificateErrorWrapper(error)
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ class WebEnginePage(QWebEnginePage):
|
|||
@pyqtSlot(QWebEngineCertificateError)
|
||||
def _handle_certificate_error(self, qt_error):
|
||||
"""Handle certificate errors coming from Qt."""
|
||||
error = certificateerror.create(qt_error)
|
||||
error = certificateerror.CertificateErrorWrapper(qt_error)
|
||||
self.certificate_error.emit(error)
|
||||
# Right now, we never defer accepting, due to a PyQt bug
|
||||
return error.certificate_was_accepted()
|
||||
|
|
|
|||
Loading…
Reference in New Issue