diff options
author | Fred Wright <fw@fwright.net> | 2016-04-10 19:29:07 -0700 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2016-04-11 03:24:28 -0400 |
commit | f759d02299ca5b1d26aeaad44096e41979a699f1 (patch) | |
tree | 22e8b8c63ee5db41ab24378b51a2b38149cb309b /devtools/ais.py | |
parent | 6005fde964ba8abfe48160c36b224dadd2bdc741 (diff) | |
download | gpsd-f759d02299ca5b1d26aeaad44096e41979a699f1.tar.gz |
Fixes devtools/ais.py to use new-style classes.
See previous commits for the rationale.
Not tested.
Diffstat (limited to 'devtools/ais.py')
-rwxr-xr-x | devtools/ais.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/devtools/ais.py b/devtools/ais.py index 790e7601..594ccc98 100755 --- a/devtools/ais.py +++ b/devtools/ais.py @@ -40,7 +40,7 @@ except AttributeError: # Here are the pseudoinstructions in the pseudolanguage. -class bitfield: +class bitfield(object): "Object defining the interpretation of an AIS bitfield." # The only un-obvious detail is the use of the oob (out-of-band) # member. This isn't used in data extraction, but rather to cut @@ -58,13 +58,13 @@ class bitfield: self.formatter = formatter # Custom reporting hook. self.conditional = conditional # Evaluation guard for this field -class spare: +class spare(object): "Describes spare bits,, not to be interpreted." def __init__(self, width, conditional=None): self.width = width self.conditional = conditional # Evaluation guard for this field -class dispatch: +class dispatch(object): "Describes how to dispatch to a message type variant on a subfield value." def __init__(self, fieldname, subtypes, compute=lambda x: x, conditional=None): self.fieldname = fieldname # Value of view to dispatch on @@ -944,7 +944,7 @@ from array import array BITS_PER_BYTE = 8 -class BitVector: +class BitVector(object): "Fast bit-vector class based on Python built-in array type." def __init__(self, data=None, length=None): self.bits = array('B') |