Skip to content

Commit df4e17f

Browse files
committed
Added support for save_hg_info and save_git_info options in the labconfig [labscript] section.
1 parent e0073ea commit df4e17f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

labscript/labscript.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
import labscript_utils.h5_lock, h5py
3333
import labscript_utils.properties
34+
from labscript_utils.labconfig import LabConfig
3435

3536
# This imports the default Qt library that other labscript suite code will
3637
# import as well, since it all uses qtutils. By having a Qt library already
@@ -2547,8 +2548,8 @@ def labscript_cleanup():
25472548
compiler.wait_delay = 0
25482549
compiler.time_markers = {}
25492550
compiler._PrimaryBLACS = None
2550-
compiler.save_hg_info = True
2551-
compiler.save_git_info = True
2551+
compiler.save_hg_info = LabConfig().getboolean('labscript', 'save_hg_info', fallback=True)
2552+
compiler.save_git_info = LabConfig().getboolean('labscript', 'save_git_info', fallback=False)
25522553
compiler.shot_properties = {}
25532554

25542555
class compiler(object):
@@ -2568,8 +2569,8 @@ class compiler(object):
25682569
wait_delay = 0
25692570
time_markers = {}
25702571
_PrimaryBLACS = None
2571-
save_hg_info = True
2572-
save_git_info = True
2572+
save_hg_info = LabConfig().getboolean('labscript', 'save_hg_info', fallback=True)
2573+
save_git_info = LabConfig().getboolean('labscript', 'save_git_info', fallback=False)
25732574
shot_properties = {}
25742575

25752576
# safety measure in case cleanup is called before init

0 commit comments

Comments
 (0)