From 8446d17968dedb036f095cb0bd9c3404e452706c Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Fri, 21 Sep 2018 14:42:49 -0700 Subject: add gps module version check to Python programs --- contrib/ubxtool | 6 ++++++ contrib/zerk | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'contrib') 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 -- cgit v1.2.1