File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed
Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -142,13 +142,6 @@ def yaml_to_dict(path):
142142 except Exception as e :
143143 raise ValueError (f"Could not load YAML file: { e } " )
144144
145- # Convert Sire containers to lists.
146- for key , value in d .items ():
147- try :
148- d [key ] = value .to_list ()
149- except :
150- pass
151-
152145 return d
153146
154147
Original file line number Diff line number Diff line change @@ -880,12 +880,22 @@ def _compare_configs(config1, config2):
880880 if isinstance (v2 , _GeneralUnit ):
881881 v2 = str (v2 )
882882
883- # If one is from sire and the other is not, will raise error even though they are the same.
883+ # Convert Sire containers to lists for comparison.
884+ try :
885+ v1 = v1 .to_list ()
886+ except :
887+ pass
888+ try :
889+ v2 = v2 .to_list ()
890+ except :
891+ pass
892+
884893 if (v1 == None and v2 == False ) or (v2 == None and v1 == False ):
885894 continue
886895 elif v1 != v2 :
887896 raise ValueError (
888- f"{ key } has changed since the last run. This is not allowed when using the restart option."
897+ f"{ key } has changed since the last run. This is not "
898+ "allowed when using the restart option."
889899 )
890900
891901 def _verify_restart_config (self ):
You can’t perform that action at this time.
0 commit comments