File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,11 @@ static int PyXmlSec_Init(void) {
8787 PyXmlSec_Free (_PYXMLSEC_FREE_ALL );
8888 return -1 ;
8989 }
90+ // xmlsec will install default callback in xmlSecCryptoInit,
91+ // overwriting any custom callbacks.
92+ // We thus reinstall our callback now.
93+ PyXmlSec_InstallErrorCallback ();
94+
9095 free_mode = _PYXMLSEC_FREE_ALL ;
9196 return 0 ;
9297}
@@ -239,11 +244,6 @@ PYENTRY_FUNC_NAME(void)
239244
240245 if (PyXmlSec_Init () < 0 ) goto ON_FAIL ;
241246
242- // xmlsec will install default callback in PyXmlSec_Init,
243- // overwriting any custom callbacks.
244- // We thus install our callback again now.
245- PyXmlSec_InstallErrorCallback ();
246-
247247 if (PyModule_AddStringConstant (module , "__version__" , STRINGIFY (MODULE_VERSION )) < 0 ) goto ON_FAIL ;
248248
249249 if (PyXmlSec_InitLxmlModule () < 0 ) goto ON_FAIL ;
Original file line number Diff line number Diff line change @@ -10,5 +10,5 @@ def test_reinitialize_module(self):
1010 tests don't fail, we know that the ``init()``/``shutdown()``
1111 function pair doesn't break anything.
1212 """
13- # xmlsec.shutdown()
14- # xmlsec.init()
13+ xmlsec .shutdown ()
14+ xmlsec .init ()
You can’t perform that action at this time.
0 commit comments