diff options
author | Gary E. Miller <gem@rellim.com> | 2018-09-21 21:06:49 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2018-09-21 21:06:49 -0700 |
commit | b8ab17d31c9840cfcaf8c413bd8a3422c43d72a9 (patch) | |
tree | c87e06ec1cca1b669342d43d09c736a39aa9cbba /gpscat | |
parent | 63a2af811c7377714f699973136a791de89db30a (diff) | |
download | gpsd-b8ab17d31c9840cfcaf8c413bd8a3422c43d72a9.tar.gz |
gpscat: pylint cleanups
Diffstat (limited to 'gpscat')
-rwxr-xr-x | gpscat | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1,10 +1,9 @@ #!/usr/bin/env python # +"Display GPS output. Hexify it if necessary." + # This file is Copyright (c) 2010 by the GPSD project # SPDX-License-Identifier: BSD-2-clause -# -# Display GPS output. Hexify it if necessary. -# # This code runs compatibly under Python 2 and 3.x for x >= 2. # Preserve this property! @@ -40,6 +39,7 @@ highhalf_latch = True def hexdump(st): + "Convert string to hex string" dmp = "" for ch in bytearray(st): # bytearray gets array of ints in Python 2 and 3 if curses.ascii.isprint(ch) or curses.ascii.isspace(ch): @@ -52,12 +52,14 @@ def hexdump(st): debuglevel = 0 -def reporter(errlevel, msg): +def reporter(errlevel, mesg): + "Report errors, depending on log level" if errlevel <= debuglevel: - sys.stdout.write(msg) + sys.stdout.write(mesg) def printusage(): + "Print usage" sys.stderr.write("usage: gpscat [-D debuglevel] [-h] [-p] [-s speed] [-t] " "[-V] serial-port\n") |