diff options
author | Linus Nordberg <linus@nordberg.se> | 2015-04-13 16:10:26 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordberg.se> | 2015-04-13 16:10:26 +0200 |
commit | 04bdf8e0d7c317ab6cfaf68ad3d9c53dc4dbf810 (patch) | |
tree | bc02e21c915840be23f611ef93c33709158892e5 | |
parent | 4c5494afee19f7c5a2048e0e875ebb214d8229f3 (diff) |
fixup! WIP
-rwxr-xr-x | tools/merge.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/merge.py b/tools/merge.py index 0435b77..23b0d48 100755 --- a/tools/merge.py +++ b/tools/merge.py @@ -226,7 +226,17 @@ def verify_entry(verifycert, entry, hash): mtl = unpacked[0] assert hash == get_leaf_hash(mtl) s = struct.pack(">I", len(entry)) + entry - verifycert.stdin.write(s) + try: + verifycert.stdin.write(s) + except IOError, e: + sys.stderr.write("e = " + repr(e)) + sys.stderr.write("merge: unable to write to verifycert: ") + while 1: + line = verifycert.stdout.readline() + if line: + sys.stderr.write(line) + else: + sys.exit(1) result_length_packed = verifycert.stdout.read(4) (result_length,) = struct.unpack(">I", result_length_packed) result = verifycert.stdout.read(result_length) |