diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-11-15 15:42:05 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-11-15 15:42:05 -0500 |
commit | b82f73479ab18326f03d40fc00398090ca849d99 (patch) | |
tree | 70cc5fb8ed40c649def7daa3c229660387eb4e31 /gpscat | |
parent | 769a40ca93ccab4ed630d938bd8783827a26eab1 (diff) | |
download | gpsd-b82f73479ab18326f03d40fc00398090ca849d99.tar.gz |
More splint and pylint cleanups.
All regression tests pass with pps=tru or pps=false, PPS is live.
Diffstat (limited to 'gpscat')
-rwxr-xr-x | gpscat | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -16,9 +16,9 @@ BASELEVEL = sniffer.LOG_IO highhalf_latch = True -def hexdump(str): +def hexdump(st): dmp = "" - for (i, ch) in enumerate(str): + for (_i, ch) in enumerate(st): if curses.ascii.isprint(ord(ch)) or curses.ascii.isspace(ord(ch)): dmp += ch else: @@ -67,8 +67,8 @@ if __name__ == '__main__': raise SystemExit, 0 if (len(arguments) != 1): - printusage() - raise SystemExit, 1 + printusage() + raise SystemExit, 1 if "rfcomm" in arguments[0]: # Bluetooth special case s = socket.socket(socket.AF_BLUETOOTH, socket.SOCK_STREAM, socket.BTPROTO_RFCOMM) @@ -123,7 +123,7 @@ if __name__ == '__main__': if length == 0: break if typeflag: - sys.stdout.write(`ptype` + " (" + `length` + "@" + `counter-length` + "): " + hexdump(packet)) + sys.stdout.write(`ptype` + " (" + repr(length) + "@" + repr(counter-length) + "): " + hexdump(packet)) sys.stdout.write("\n") else: sys.stdout.write(hexdump(packet) + "\n") |