diff options
author | Jon Schlueter <jschlueter@navigationsolutions.com> | 2015-02-13 07:57:38 -0500 |
---|---|---|
committer | Jon Schlueter <jschlueter@navigationsolutions.com> | 2015-02-13 07:57:38 -0500 |
commit | 324db28f9fe08ff6fcd3685844c1580dd01c6553 (patch) | |
tree | 8dd58342244a19f147455811fb78fba0f8115738 /gpsfake | |
parent | d91eb543142dec514847759a023966f1bcf7cd96 (diff) | |
download | gpsd-324db28f9fe08ff6fcd3685844c1580dd01c6553.tar.gz |
more pep8 cleanup in gpsfake for whitespace
whitespace around operators and before function delcarations
Diffstat (limited to 'gpsfake')
-rwxr-xr-x | gpsfake | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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") |