Make git-sync-deps fail if any git clone failed

Python's Thread.join() does not fail if the thread threw
an exception. This means if we failed to clone a git repo,
the script would not return 0 and follow-on commands would
try to do work (and fail for mysterious reasons).

In Python 3.8, there is a mechanism to know if any threads
threw exceptions.
https://docs.python.org/3/library/threading.html#threading.excepthook

I'm not 100% sure if using the anything_failed variable like
this is save, but given that we are only writing one value,
a data race is probably not a big deal.

Change-Id: I9669bfa42b168f6159d59f46840a70f6acab64ce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/589411
Reviewed-by: Ravi Mistry <rmistry@google.com>
1 file changed