Skip to content

Commit

Permalink
fix: python helper fails if hepmc3 is not preset (#1303)
Browse files Browse the repository at this point in the history
python scripts fail for me because I don't have `HepMC3`
  • Loading branch information
andiwand authored Jul 6, 2022
1 parent 695d9e2 commit 51e764d
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Examples/Python/tests/helpers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,18 @@
)

dd4hepEnabled = "DD4hep_DIR" in os.environ

if dd4hepEnabled:
try:
import acts.examples.dd4hep
except ImportError:
dd4hepEnabled = False

try:
import acts.examples.hepmc3

hepmc3Enabled = True
except ImportError:
hepmc3Enabled = False
hepmc3Enabled = "HepMC3_DIR" in os.environ
if hepmc3Enabled:
try:
import acts.examples.hepmc3
except:
hepmc3Enabled = False

isCI = os.environ.get("CI", "false") == "true"

Expand Down

0 comments on commit 51e764d

Please sign in to comment.