cityindex/ec2-clock-accuracy-research — pull request #17 by sopel (2012-08-20 00:00:33+00:00)
Title: Added meaningful exit codes to validate-credentials/validate-template.

Exit code 0 is the default, if not specified otherwise within the script; I've added an error code of 13 (Windows) or os.EX_DATAERR (*nix) on failure for the two validate-* scripts now, see e.g. [validate-template.py#L76](https://github.com/cityindex/ec2-clock-accuracy-research/blob/a6d7fcb88eb9e45555f20d2e883bbc4c896e47e9/infrastructure/scripts/validate-template.py#L76).

* I'm not sure whether MacOS X qualifies as a *nix in this regard, but I'd hope so - as mentioned in the comment above the linked line it might be easier to just always use 1 for the use case at hand eventually.

Before adding this to all other scripts, we need to decide how to handle the common cross region case, i.e. a loop over all regions, where one iteration might fail, but the others don't. Guess the correct approach would be:

* store an error, if any, but continue looping
* check for an error after the loop and exit accordingly