Skip to content

Commit

Permalink
Some error checks
Browse files Browse the repository at this point in the history
  • Loading branch information
akashdhruv committed Nov 4, 2023
1 parent 4806627 commit 275d67a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion jobrunner/__meta__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Metadata for jobrunner"""

__pkgname__ = "PyJobRunner"
__version__ = "2023.11.2"
__version__ = "2023.11.3"
__authors__ = "Akash Dhruv"
__license__ = "Apache Software License"
__copyright__ = "Copyright (c) Akash Dhruv 2023. All Rights Reserved."
Expand Down
7 changes: 7 additions & 0 deletions jobrunner/instruments/flashx.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ def CreateHeater(workdir):
# Increase heater counter to track number of heaters
num_heaters = num_heaters + 1

# Raise error if the heater key does not match
# expected naming convention
if str(num_heaters).zfill(4) != key:
raise ValueError(
f'[jobrunner] Heater "{key}" does not match "{str(num_heaters).zfill(4)}"'
)

# Set filename and open the hdf5 file in write mode
filename = (
workdir + os.sep + heater_dict["sim_heaterName"] + "_hdf5_htr_" + key
Expand Down

0 comments on commit 275d67a

Please sign in to comment.