summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-09-21 14:42:49 -0700
committerGary E. Miller <gem@rellim.com>2018-09-21 14:42:49 -0700
commit8446d17968dedb036f095cb0bd9c3404e452706c (patch)
treed459474b409255e7bbebf2c396e38d9add9a3b95 /contrib
parent5331809a0ee5d28d45553d69346836b080ba9fc6 (diff)
downloadgpsd-8446d17968dedb036f095cb0bd9c3404e452706c.tar.gz
add gps module version check to Python programs
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/ubxtool6
-rwxr-xr-xcontrib/zerk6
2 files changed, 12 insertions, 0 deletions
diff --git a/contrib/ubxtool b/contrib/ubxtool
index d8999ae4..6c6c3b1a 100755
--- a/contrib/ubxtool
+++ b/contrib/ubxtool
@@ -54,6 +54,12 @@ except ImportError:
PROG_NAME)
sys.exit(2)
+gps_version = '3.18-dev'
+if gps.__version__ != gps_version:
+ sys.stderr.write("%s: ERROR: need gps module version %s, got %s\n" %
+ (PROG_NAME, gps_version, gps.__version__))
+ sys.exit(1)
+
VERB_QUIET = 0 # quiet
VERB_NONE = 1 # just output requested data and some info
diff --git a/contrib/zerk b/contrib/zerk
index ff0a0b12..61ec5542 100755
--- a/contrib/zerk
+++ b/contrib/zerk
@@ -64,6 +64,12 @@ except ImportError:
PROG_NAME)
sys.exit(2)
+gps_version = '3.18-dev'
+if gps.__version__ != gps_version:
+ sys.stderr.write("%s: ERROR: need gps module version %s, got %s\n" %
+ (PROG_NAME, gps_version, gps.__version__))
+ sys.exit(1)
+
VERB_QUIET = 0 # quiet
VERB_NONE = 1 # just output requested data and some info