diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2015-02-22 09:33:38 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-02-22 10:26:40 -0500 |
commit | 9619c79078f2fffca5a1630ada5c878c26deab44 (patch) | |
tree | f3f56b6fb7176a5451d2eec0e6ef14cb94ac5d6e | |
parent | 81d5ee9ec47cbca1dbe6430554d681d2ab90b716 (diff) | |
download | gpsd-9619c79078f2fffca5a1630ada5c878c26deab44.tar.gz |
pylint cleanup of auditing tools (not shipped).
-rwxr-xr-x | test_json_validity.py | 8 | ||||
-rw-r--r-- | valgrind-audit.py.in | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/test_json_validity.py b/test_json_validity.py index 026b02c5..7423c553 100755 --- a/test_json_validity.py +++ b/test_json_validity.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # Christian Gagneraud - 2012 -# Simple python script that will parse json dictionaries on it's input, +# Simple python script that will parse json dictionaries on its input, # If it fails, it will print the offending line and an error message. # The goal is to check that GPSD outputs valid JSON. # @@ -15,9 +15,9 @@ for line in sys.stdin.readlines(): try: # Load the json dictionary, it should raise an error if it is malformed item = json.loads(line) - except Exception as e: + except ValueError as e: success = False - print "%d: %s" % (lc, line.strip()) - print "%d: %s" % (lc, e) + print "%d: %s" % (lc, line.strip()) + print "%d: %s" % (lc, e) exit(0 if success else 1) diff --git a/valgrind-audit.py.in b/valgrind-audit.py.in index c322e24a..2b1a40e8 100644 --- a/valgrind-audit.py.in +++ b/valgrind-audit.py.in @@ -9,7 +9,7 @@ # This file is Copyright (c) 2010 by the GPSD project # BSD terms apply: see the file COPYING in the distribution root for details. # -import sys, gps.fake +import sys, gps.fake debuglevel=1 @@ -95,7 +95,7 @@ try: print "*** Test #4 complete.\n" finally: - test.cleanup(); + test.cleanup() # The following sets edit modes for GNU EMACS # Local Variables: |