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 @@ -44,6 +44,7 @@ def tracking(arguments):
4444 database = arguments .db ,
4545 message = arguments .commit ,
4646 hashid = arguments .hash ,
47+ strict = arguments .strict ,
4748 )
4849
4950 copied_mfile = shutil .copy (mfile_path , Path (arguments .db ) / mfile_path .name )
@@ -67,6 +68,7 @@ def tracking(arguments):
6768 subparser_trk .add_argument ("db" , type = str )
6869 subparser_trk .add_argument ("commit" , type = str )
6970 subparser_trk .add_argument ("hash" , type = str )
71+ subparser_trk .add_argument ("--strict" , action = "store_true" , default = False )
7072
7173 arguments = parser .parse_args ()
7274
Original file line number Diff line number Diff line change @@ -168,6 +168,7 @@ def __init__(
168168 database : str | None = None ,
169169 message : str | None = None ,
170170 hashid : str | 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 self ._generate_data ()
You can’t perform that action at this time.
0 commit comments