diff options
Diffstat (limited to 'tools/submitcert.py')
-rwxr-xr-x | tools/submitcert.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/submitcert.py b/tools/submitcert.py index 7719dc2..c443cf4 100755 --- a/tools/submitcert.py +++ b/tools/submitcert.py @@ -182,11 +182,15 @@ print ncerts, "certs" certs = get_all_certificates(certfiles) +errors = 0 + (result, timing) = submitcert(certs.next()) if result != None: nsubmitted += 1 (leafcert, issuer_key_hash, sct) = result save_sct(sct, sth, leafcert, issuer_key_hash) +else: + errors += 1 if args.pre_warm: select.select([], [], [], 3.0) @@ -205,6 +209,8 @@ try: nsubmitted += 1 (leafcert, issuer_key_hash, sct) = result save_sct(sct, sth, leafcert, issuer_key_hash) + else: + errors += 1 deltatime = datetime.datetime.now() - starttime deltatime_f = deltatime.seconds + deltatime.microseconds / 1000000.0 rate = nsubmitted / deltatime_f @@ -216,3 +222,7 @@ try: except KeyboardInterrupt: p.terminate() p.join() + +if errors: + print >> sys.stderr, errors, "errors encountered, exiting with error code" + sys.exit(1) |