From 05f4f68c54c72d0192ba4e901678dc074f28ebfd Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Thu, 16 Apr 2020 17:44:17 +1000 Subject: [PATCH] rust_lib_demo: Remove bin2hex.py We are using scripts/bin2hex.py, so we can get rid of this copy. Signed-off-by: Anton Blanchard --- rust_lib_demo/bin2hex.py | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100755 rust_lib_demo/bin2hex.py diff --git a/rust_lib_demo/bin2hex.py b/rust_lib_demo/bin2hex.py deleted file mode 100755 index af278bc..0000000 --- a/rust_lib_demo/bin2hex.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/python3 - -import sys -import subprocess -import struct - -with open(sys.argv[1], "rb") as f: - while True: - word = f.read(8) - if len(word) == 8: - print("%016x" % struct.unpack('Q', word)); - elif len(word) == 4: - print("00000000%08x" % struct.unpack('I', word)); - elif len(word) == 0: - exit(0); - else: - raise Exception("Bad length")