Skip to content

Commit 50a806b

Browse files
committed
[tutorials] Don't successfully exit tutorials if input files are missing
This doesn't help the user, and also confuses the CI when testing, because tutorials can apparently succeed even if they do nothing.
1 parent 1f37c17 commit 50a806b

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

tutorials/hist/hist015_TH1_read_and_draw.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,10 @@
2222
pad2.Draw()
2323
pad3.Draw()
2424
#
25-
# We connect the ROOT file generated in a previous tutorial
25+
# We connect the ROOT file generated in the hsimple.py tutorial
2626
#
27-
File = "py-hsimple.root"
28-
if (ROOT.gSystem.AccessPathName(File)) :
29-
ROOT.Info("hist015_TH1_read_and_draw.py", File+" does not exist")
30-
exit()
3127

32-
example = TFile(File)
28+
example = TFile("py-hsimple.root")
3329
example.ls()
3430

3531
# Draw a global picture title
@@ -86,4 +82,4 @@
8682
c1.Update()
8783

8884
if (example.IsOpen()):
89-
example.Close()
85+
example.Close()

tutorials/hist/hist015_TH1_read_and_draw_uhi.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,9 @@
1919
mpl_fig = plt.figure(figsize=(14, 12))
2020
gs = mpl_fig.add_gridspec(3, 2, height_ratios=[1.5, 1.5, 1.5])
2121

22-
# We connect the ROOT file generated in a previous tutorial
23-
File = "py-hsimple.root"
24-
if ROOT.gSystem.AccessPathName(File):
25-
ROOT.Info("hist015_TH1_read_and_draw.py", File + " does not exist")
26-
exit()
22+
# We connect the ROOT file generated in the hsimple.py tutorial
2723

28-
example = TFile(File)
24+
example = TFile("py-hsimple.root")
2925
example.ls()
3026

3127
# Draw histogram hpx in first pad.

0 commit comments

Comments
 (0)