summaryrefslogtreecommitdiff
path: root/gpscat
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-09-21 21:06:49 -0700
committerGary E. Miller <gem@rellim.com>2018-09-21 21:06:49 -0700
commitb8ab17d31c9840cfcaf8c413bd8a3422c43d72a9 (patch)
treec87e06ec1cca1b669342d43d09c736a39aa9cbba /gpscat
parent63a2af811c7377714f699973136a791de89db30a (diff)
downloadgpsd-b8ab17d31c9840cfcaf8c413bd8a3422c43d72a9.tar.gz
gpscat: pylint cleanups
Diffstat (limited to 'gpscat')
-rwxr-xr-xgpscat12
1 files changed, 7 insertions, 5 deletions
diff --git a/gpscat b/gpscat
index ea2c574e..fba44d96 100755
--- a/gpscat
+++ b/gpscat
@@ -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")