Skip to content

Commit

Permalink
Remove else
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Nov 7, 2023
1 parent aab5f4c commit 40dbbc3
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions python/podio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,37 @@
except ImportError:
print('Unable to load podio, make sure that libpodio.so is in LD_LIBRARY_PATH')
raise
else:
from .frame import Frame
from . import root_io, reading

try:
# We try to import the sio bindings which may fail if ROOT is not able to
# load the dictionary. In this case they have most likely not been built and
# we just move on
from . import sio_io
except ImportError:
pass

from . import EventStore

try:
# For some reason the test_utils only work at (test) runtime if they are
# imported with the rest of podio. Otherwise they produce a weird c++ error.
# This happens even if we import the *exact* same file.
from . import test_utils # noqa: F401
except ImportError:
pass

# Make sure that this module is actually usable as podio even though most of
# it is dynamically populated by cppyy
sys.modules["podio"] = podio

__all__ = [
"__version__",
"Frame",
"root_io",
"sio_io",
"reading",
"EventStore"
]

from .frame import Frame
from . import root_io, reading

try:
# We try to import the sio bindings which may fail if ROOT is not able to
# load the dictionary. In this case they have most likely not been built and
# we just move on
from . import sio_io
except ImportError:
pass

from . import EventStore

try:
# For some reason the test_utils only work at (test) runtime if they are
# imported with the rest of podio. Otherwise they produce a weird c++ error.
# This happens even if we import the *exact* same file.
from . import test_utils # noqa: F401
except ImportError:
pass

# Make sure that this module is actually usable as podio even though most of
# it is dynamically populated by cppyy
sys.modules["podio"] = podio

__all__ = [
"__version__",
"Frame",
"root_io",
"sio_io",
"reading",
"EventStore"
]

0 comments on commit 40dbbc3

Please sign in to comment.