| // See if we have any errors that should be fatal to the site update process |
| if (el.error_list.size()) |
| { cout << "ABORTING due to " << el.error_list.size() << " errors:" << endl; |
| for (unsignedint i = 0; i < el.error_list.size(); i++) |
| cout << i+1 << ": " << el.error_list[i] << endl; |
| return0; |
| } |
should return 1, not 0.
Compare:
| # See if we have any errors that should be fatal to the site update process |
| iflen(el.error_list) >0: |
| print("ABORTING due to "+str(len(el.error_list)) +" errors:") |
| foriinrange(len(el.error_list)): |
| print(str(i+1) +": "+el.error_list[i]) |
| sys.exit(1) |
exit(1) is required for localupdate.sh to work properly in event of ErrorList errors aborting the siteupdate process.
C++ needs
return 1 for similar functionality with a localupdate-style script.
| else { cout << "Error opening directory " << args.userlistfilepath << ". (Not found?)" << endl; |
| return0; |
| } |
should also be changed. The Python version is different enough to not have an
exit here, but if this will terminate the program, it should similarly return 1. Probably make this an ErrorList error too.
DataProcessing/siteupdate/cplusplus/siteupdate.cpp
Lines 950 to 956 in 889af2d
should return 1, not 0.
Compare:
DataProcessing/siteupdate/python-teresco/siteupdate.py
Lines 3086 to 3091 in 889af2d
exit(1)is required for localupdate.sh to work properly in event of ErrorList errors aborting the siteupdate process.C++ needs
return 1for similar functionality with a localupdate-style script.DataProcessing/siteupdate/cplusplus/siteupdate.cpp
Lines 124 to 126 in 889af2d
should also be changed. The Python version is different enough to not have an
exithere, but if this will terminate the program, it should similarly return 1. Probably make this an ErrorList error too.