From 0f9865c249048d729ce789ff21e4dbec79708898 Mon Sep 17 00:00:00 2001 From: vm03 Date: Tue, 20 Aug 2019 14:40:21 +0300 Subject: [PATCH] print progress dots --- payload_dumper.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/payload_dumper.py b/payload_dumper.py index 880a1c1..79661be 100644 --- a/payload_dumper.py +++ b/payload_dumper.py @@ -91,7 +91,8 @@ def data_for_op(op,out_file,old_file): return data def dump_part(part): - print(part.partition_name) + sys.stdout.write("Processing %s partition" % part.partition_name) + sys.stdout.flush() out_file = open('%s/%s.img' % (args.out, part.partition_name), 'wb') h = hashlib.sha256() @@ -103,6 +104,10 @@ def dump_part(part): for op in part.operations: data = data_for_op(op,out_file,old_file) + sys.stdout.write(".") + sys.stdout.flush() + + print("Done") parser = argparse.ArgumentParser(description='OTA payload dumper')