From: Uwe Hermann Date: Thu, 8 Aug 2013 17:55:07 +0000 (+0200) Subject: firmware tools: Cosmetics, whitespace. X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-util.git;a=commitdiff_plain;h=08a979afc74f56b6b23a129a89406a2949ccaefe firmware tools: Cosmetics, whitespace. --- diff --git a/firmware/hantek-dso/sigrok-fwextract-hantek-dso b/firmware/hantek-dso/sigrok-fwextract-hantek-dso index c90e36f..15c846c 100755 --- a/firmware/hantek-dso/sigrok-fwextract-hantek-dso +++ b/firmware/hantek-dso/sigrok-fwextract-hantek-dso @@ -88,6 +88,3 @@ try: print("saved %d bytes to %s" % (len(blob), outfile)) except Exception as e: print("Error: %s" % str(e)) - - - diff --git a/firmware/saleae-logic16/sigrok-fwextract-saleae-logic16 b/firmware/saleae-logic16/sigrok-fwextract-saleae-logic16 index 45f9827..62d66a1 100755 --- a/firmware/saleae-logic16/sigrok-fwextract-saleae-logic16 +++ b/firmware/saleae-logic16/sigrok-fwextract-saleae-logic16 @@ -24,7 +24,7 @@ import parseelf class searcher: - def reset(this, offs = 0): + def reset(this, offs=0): if offs < 0 or offs > this.length: raise Exception('Reset past end of section') this.address = this.baseaddr + offs @@ -103,7 +103,7 @@ def parse_hex_file_lines_constructor_32(text, basic_string_plt, got_plt, lines): text.skip(6) straddr += got_plt else: - raise Exception('Expected lea offs32(%ebx),%eax @ '+ + raise Exception('Expected lea offs32(%ebx),%eax @ ' + ('0x%x' % text.address)) if text.peek(4) == b'\x89\x44\x24\x04': # mov %eax,0x4(%esp) text.skip(4) @@ -117,7 +117,7 @@ def parse_hex_file_lines_constructor_32(text, basic_string_plt, got_plt, lines): offs = struct.unpack(' (len(lines) << 2) or (offs & 3) != 0: raise Exception('Invalid offset %d' % offs) @@ -130,10 +130,10 @@ def parse_hex_file_lines_constructor_32(text, basic_string_plt, got_plt, lines): offs = struct.unpack(' (len(lines) << 3) or (offs & 7) != 0: raise Exception('Invalid offset %d' % offs) @@ -179,10 +179,10 @@ def parse_hex_file_lines_constructor_64(text, basic_string_plt, lines): offs = struct.unpack('") @@ -311,4 +311,3 @@ try: extract_bitstream(elf, '33') except Exception as e: print("Error: %s" % str(e)) -