diff options
author | Gary E. Miller <gem@rellim.com> | 2018-09-21 14:59:35 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2018-09-21 14:59:35 -0700 |
commit | 3418b9b73ac5c7cef9b4c5414d9eb3484f2b57d2 (patch) | |
tree | 0c4b48ed141389a740b8963ac3a7116092f3e538 /xgpsspeed | |
parent | 7e83f27199bbcdf802ea9064601aa79829b52240 (diff) | |
download | gpsd-3418b9b73ac5c7cef9b4c5414d9eb3484f2b57d2.tar.gz |
xgpsspeed: fix -V and --version options.
Diffstat (limited to 'xgpsspeed')
-rwxr-xr-x | xgpsspeed | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -778,7 +778,17 @@ if __name__ == '__main__': help='The unit of speed. Possible units are: mph, kmh, knots. ' '[Default mph]' ) + parser.add_option( + '-V', '--version', + action='store_true', + default=False, + help='Output version to stderr, then exit' + ) (options, args) = parser.parse_args() + if options.version: + sys.stderr.write("xgpspeed: Version %s\n" % gps_version) + sys.exit(0) + if args: arg = args[0].split(':') len_arg = len(arg) |