Commit df879ae
authored
fix(cfg_vanilla): treat empty-string solver_options_file as unset (#714)
shared_options() and apply_solver_specs() gated the
load_solver_options_file() call on _hasit(cfg, ...), which returns
True for any non-None value -- including "". Callers that default
solver_options_file or {name}_solver_options_file to "" (e.g. as a
YAML/JSON sentinel for "no file") were hitting
FileNotFoundError: [Errno 2] No such file or directory: ''.
Replace _hasit with a plain truthiness check on the path. None and
"" are both treated as unset, matching conventional file-path-arg
semantics. No other _hasit semantics changed.
Adds regression tests in test_solver_options_layers.py for both
the global flag and a per-spoke flag.1 parent 265345b commit df879ae
2 files changed
Lines changed: 23 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
910 | 910 | | |
911 | 911 | | |
912 | 912 | | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
913 | 922 | | |
914 | 923 | | |
915 | 924 | | |
| |||
1030 | 1039 | | |
1031 | 1040 | | |
1032 | 1041 | | |
1033 | | - | |
1034 | | - | |
1035 | 1042 | | |
1036 | 1043 | | |
1037 | 1044 | | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
1038 | 1057 | | |
1039 | 1058 | | |
1040 | 1059 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| |||
0 commit comments