File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ def tracking(arguments):
4545 message = arguments .commit ,
4646 hashid = arguments .hash ,
4747 tracking_variables_file = arguments .tracking_variables_file ,
48+ strict = arguments .strict ,
4849 )
4950
5051 copied_mfile = shutil .copy (mfile_path , Path (arguments .db ) / mfile_path .name )
@@ -75,6 +76,7 @@ def tracking(arguments):
7576 help = "A JSON file containing a list of variables to track."
7677 "See the description of DEFAULT_TRACKING_VARIABLES for details on formatting the strings in the list." ,
7778 )
79+ subparser_trk .add_argument ("--strict" , action = "store_true" , default = False )
7880
7981 arguments = parser .parse_args ()
8082
Original file line number Diff line number Diff line change @@ -168,6 +168,7 @@ def __init__(
168168 message : str | None = None ,
169169 hashid : str | None = None ,
170170 tracking_variables_file : pathlib .Path | None = None ,
171+ strict : bool = False ,
171172 ) -> None :
172173 """Drive the creation of tracking JSON files.
173174
@@ -178,6 +179,10 @@ def __init__(
178179 :type database: str
179180 """
180181 self .mfile = mf .MFile (mfile )
182+
183+ if strict and (ifail := self .mfile .data ["ifail" ].get_scan (- 1 ) != 1 ):
184+ raise RuntimeError (f"{ ifail = } indicates PROCESS has failed to converge." )
185+
181186 self .tracking_file = TrackingFile ()
182187
183188 if tracking_variables_file is None :
You can’t perform that action at this time.
0 commit comments