summaryrefslogtreecommitdiff
path: root/gpsfake
diff options
context:
space:
mode:
authorJon Schlueter <jschlueter@navigationsolutions.com>2015-02-13 07:57:38 -0500
committerJon Schlueter <jschlueter@navigationsolutions.com>2015-02-13 07:57:38 -0500
commit324db28f9fe08ff6fcd3685844c1580dd01c6553 (patch)
tree8dd58342244a19f147455811fb78fba0f8115738 /gpsfake
parentd91eb543142dec514847759a023966f1bcf7cd96 (diff)
downloadgpsd-324db28f9fe08ff6fcd3685844c1580dd01c6553.tar.gz
more pep8 cleanup in gpsfake for whitespace
whitespace around operators and before function delcarations
Diffstat (limited to 'gpsfake')
-rwxr-xr-xgpsfake9
1 files changed, 6 insertions, 3 deletions
diff --git a/gpsfake b/gpsfake
index 638fbb1c..d587c99c 100755
--- a/gpsfake
+++ b/gpsfake
@@ -27,6 +27,7 @@ class Baton:
# nunber of baton states, otherwise it will cause beat artifacts
# in the twirling.
SPINNER_INTERVAL = 11
+
def __init__(self, prompt, endmsg=None):
self.stream = sys.stderr
self.stream.write(prompt + "...")
@@ -59,12 +60,14 @@ class Baton:
self.stream.write("...(%2.2f sec) %s.\n" % (time.time() - self.time, msg))
return
+
def hexdump(s):
rep = ""
for c in s:
rep += "%02x" % ord(c)
return rep
+
def fakehook(linenumber, fakegps):
if len(fakegps.testload.sentences) == 0:
print >>sys.stderr, "fakegps: no sentences in test load."
@@ -150,14 +153,14 @@ if __name__ == '__main__':
tcp = True
elif (switch == '-T'):
sys.stdout.write("sys %s platform %s: WRITE_PAD = %.5f\n" % (sys.platform, platform.platform(), gpsfake.WRITE_PAD))
- raise SystemExit,0
+ raise SystemExit, 0
elif (switch == '-u'):
udp = True
elif (switch == '-v'):
verbose += 1
elif (switch == '-h'):
sys.stderr.write("usage: gpsfake [-h] [-l] [-m monitor] [--D debug] [-o options] [-p] [-s speed] [-S] [-c cycle] [-b] logfile\n")
- raise SystemExit,0
+ raise SystemExit, 0
try:
pty.openpty()
@@ -205,7 +208,7 @@ if __name__ == '__main__':
if e.filename is None:
sys.stderr.write("gpsfake: unknown internal I/O error %s\n" % e)
else:
- sys.stderr.write("gpsfake: no such file as %s or file unreadable\n"%e.filename)
+ sys.stderr.write("gpsfake: no such file as %s or file unreadable\n" % e.filename)
raise SystemExit, 1
except OSError:
sys.stderr.write("gpsfake: can't open pty.\n")