diff --git a/python/podio/data_source.py b/python/podio/data_source.py index cead7b890..157c94781 100644 --- a/python/podio/data_source.py +++ b/python/podio/data_source.py @@ -2,7 +2,10 @@ from ROOT import gSystem -if gSystem.Load("libpodioDataSourceDict") < 0: +if ( + not gSystem.DynamicPathName("libpodioDataSourceDict", True) + or gSystem.Load("libpodioDataSourceDict") < 0 +): raise ImportError("Error when loading libpodioDataSourceDict") from ROOT import podio # pylint: disable=wrong-import-position