From 3f8bf973ece95e0f07481ee30d3cb2de4c409a29 Mon Sep 17 00:00:00 2001 From: Chun-Te Sung Date: Wed, 23 May 2018 00:06:06 +0200 Subject: [PATCH] Fixed typos (cmpids -> compids) --- .../holmesprocessing/totem/services/richheader/richlibrary.py | 4 ++-- .../holmesprocessing/totem/services/richheader/standalone.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/scala/org/holmesprocessing/totem/services/richheader/richlibrary.py b/src/main/scala/org/holmesprocessing/totem/services/richheader/richlibrary.py index 7dec567..b78b8c9 100644 --- a/src/main/scala/org/holmesprocessing/totem/services/richheader/richlibrary.py +++ b/src/main/scala/org/holmesprocessing/totem/services/richheader/richlibrary.py @@ -113,7 +113,7 @@ def parse(self): ## Bonus feature: Calculate and check the check sum csum chk = self.generate_csum(dat, cmpids, dans) - return {'error': 0, 'cmpids': cmpids, 'csum_calc': chk, 'csum_file': csum, + return {'error': 0, 'compids': cmpids, 'csum_calc': chk, 'csum_file': csum, 'offset': dans} def __pprint_cmpids(self, cmpids): @@ -130,7 +130,7 @@ def __pprint_cmpids(self, cmpids): print("-" * (20 + 16 + 16)) def pprint_header(self, data): - self.__pprint_cmpids(data['cmpids']) + self.__pprint_cmpids(data['compids']) if rich['csum_calc'] == rich['csum_file']: print("\x1b[32mChecksums match! (0x{:08x})".format(rich['csum_calc'])) else: diff --git a/src/main/scala/org/holmesprocessing/totem/services/richheader/standalone.py b/src/main/scala/org/holmesprocessing/totem/services/richheader/standalone.py index a26b72f..8ac121f 100644 --- a/src/main/scala/org/holmesprocessing/totem/services/richheader/standalone.py +++ b/src/main/scala/org/holmesprocessing/totem/services/richheader/standalone.py @@ -75,7 +75,7 @@ def parse(fname): ## Truncate calculated checksum to 32 bit chk &= 0xffffffff - return {'err': 0, 'cmpids': cmpids, 'csum_calc': chk, 'csum_file': csum, + return {'err': 0, 'compids': cmpids, 'csum_calc': chk, 'csum_file': csum, 'offset': dans} def err2str(code): @@ -108,7 +108,7 @@ def pprint_cmpids(cmpids): print("-" * (20 + 16 + 16)) def pprint_header(data): - pprint_cmpids(data['cmpids']) + pprint_cmpids(data['compids']) if rich['csum_calc'] == rich['csum_file']: print("\x1b[32mChecksums match! (0x{:08x})".format(rich['csum_calc'])) else: