forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitcad4323
committed
Refactor check_ functions to use filehandle for status
When reporting failure in check_ functions there is (typically) a text-file mentioned in the error report which contains further details. Somecheck_ functions kept a separate flag variable to indicate failure, andsome just checked the state of the filehandle as it's guaranteed to beopen when the check failed. This refactors the functions to consistentlydo the same check on error reporting. As the error report contains thefilepath, it makes more sense to check the filehandle state and skip theflag variable.Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>Reviewed-by: Bruce Momjian <bruce@momjian.us>Discussion:https://postgr.es/m/595759F6-625B-4ED7-8125-91AF00437F83@yesql.se1 parent7d5852c commitcad4323
3 files changed
+7
-34
lines changedLines changed: 5 additions & 25 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
711 | 711 |
| |
712 | 712 |
| |
713 | 713 |
| |
714 |
| - | |
715 | 714 |
| |
716 | 715 |
| |
717 | 716 |
| |
| |||
750 | 749 |
| |
751 | 750 |
| |
752 | 751 |
| |
753 |
| - | |
754 | 752 |
| |
755 | 753 |
| |
756 | 754 |
| |
| |||
765 | 763 |
| |
766 | 764 |
| |
767 | 765 |
| |
768 |
| - | |
769 |
| - | |
770 |
| - | |
771 | 766 |
| |
| 767 | + | |
772 | 768 |
| |
773 | 769 |
| |
774 | 770 |
| |
| |||
829 | 825 |
| |
830 | 826 |
| |
831 | 827 |
| |
832 |
| - | |
833 | 828 |
| |
834 | 829 |
| |
835 | 830 |
| |
| |||
870 | 865 |
| |
871 | 866 |
| |
872 | 867 |
| |
873 |
| - | |
874 | 868 |
| |
875 | 869 |
| |
876 | 870 |
| |
| |||
890 | 884 |
| |
891 | 885 |
| |
892 | 886 |
| |
893 |
| - | |
894 |
| - | |
895 |
| - | |
896 | 887 |
| |
| 888 | + | |
897 | 889 |
| |
898 | 890 |
| |
899 | 891 |
| |
| |||
915 | 907 |
| |
916 | 908 |
| |
917 | 909 |
| |
918 |
| - | |
919 | 910 |
| |
920 | 911 |
| |
921 | 912 |
| |
| |||
968 | 959 |
| |
969 | 960 |
| |
970 | 961 |
| |
971 |
| - | |
972 | 962 |
| |
973 | 963 |
| |
974 | 964 |
| |
| |||
992 | 982 |
| |
993 | 983 |
| |
994 | 984 |
| |
995 |
| - | |
996 |
| - | |
997 |
| - | |
998 | 985 |
| |
| 986 | + | |
999 | 987 |
| |
1000 | 988 |
| |
1001 | 989 |
| |
| |||
1145 | 1133 |
| |
1146 | 1134 |
| |
1147 | 1135 |
| |
1148 |
| - | |
1149 | 1136 |
| |
1150 | 1137 |
| |
1151 | 1138 |
| |
| |||
1179 | 1166 |
| |
1180 | 1167 |
| |
1181 | 1168 |
| |
1182 |
| - | |
1183 | 1169 |
| |
1184 | 1170 |
| |
1185 | 1171 |
| |
| |||
1199 | 1185 |
| |
1200 | 1186 |
| |
1201 | 1187 |
| |
1202 |
| - | |
1203 |
| - | |
1204 |
| - | |
1205 | 1188 |
| |
| 1189 | + | |
1206 | 1190 |
| |
1207 | 1191 |
| |
1208 | 1192 |
| |
| |||
1401 | 1385 |
| |
1402 | 1386 |
| |
1403 | 1387 |
| |
1404 |
| - | |
1405 | 1388 |
| |
1406 | 1389 |
| |
1407 | 1390 |
| |
| |||
1441 | 1424 |
| |
1442 | 1425 |
| |
1443 | 1426 |
| |
1444 |
| - | |
1445 | 1427 |
| |
1446 | 1428 |
| |
1447 | 1429 |
| |
| |||
1463 | 1445 |
| |
1464 | 1446 |
| |
1465 | 1447 |
| |
1466 |
| - | |
1467 |
| - | |
1468 |
| - | |
1469 | 1448 |
| |
| 1449 | + | |
1470 | 1450 |
| |
1471 | 1451 |
| |
1472 | 1452 |
| |
|
Lines changed: 1 addition & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
123 | 123 |
| |
124 | 124 |
| |
125 | 125 |
| |
126 |
| - | |
127 | 126 |
| |
128 | 127 |
| |
129 | 128 |
| |
| |||
158 | 157 |
| |
159 | 158 |
| |
160 | 159 |
| |
161 |
| - | |
162 | 160 |
| |
163 | 161 |
| |
164 | 162 |
| |
| |||
181 | 179 |
| |
182 | 180 |
| |
183 | 181 |
| |
184 |
| - | |
| 182 | + | |
185 | 183 |
| |
186 | 184 |
| |
187 | 185 |
| |
|
Lines changed: 1 addition & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
391 | 391 |
| |
392 | 392 |
| |
393 | 393 |
| |
394 |
| - | |
395 | 394 |
| |
396 | 395 |
| |
397 | 396 |
| |
| |||
417 | 416 |
| |
418 | 417 |
| |
419 | 418 |
| |
420 |
| - | |
421 |
| - | |
422 | 419 |
| |
423 | 420 |
| |
424 | 421 |
| |
| |||
442 | 439 |
| |
443 | 440 |
| |
444 | 441 |
| |
445 |
| - | |
446 |
| - | |
447 |
| - | |
448 | 442 |
| |
| 443 | + | |
449 | 444 |
| |
450 | 445 |
| |
451 | 446 |
| |
|
0 commit comments
Comments
(0)