diff options
author | Gary E. Miller <gem@rellim.com> | 2018-11-16 20:32:38 +0000 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2018-11-16 20:32:38 +0000 |
commit | ba2f6aa82d7dd130bbb632c45aeb60250027be0c (patch) | |
tree | 038d1151a44136e42c2768ce791f919a424023b6 | |
parent | 6910812d58c8572401d035a4e8e006cd1b338824 (diff) | |
download | gpsd-ba2f6aa82d7dd130bbb632c45aeb60250027be0c.tar.gz |
gpssim.py: Add test for PYTHONPATH
-rw-r--r-- | gpssim.py | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -10,8 +10,15 @@ import random import sys import time -import gps -import gpslib +# pylint wants local modules last +try: + import gps + import gpslib +except ImportError as e: + sys.stderr.write( + "gpssim.py: can't load Python gps libraries -- check PYTHONPATH.\n") + sys.stderr.write("%s\n" % e) + sys.exit(1) # First, the mathematics. We simulate a moving viewpoint on the Earth # and a satellite with specified orbital elements in the sky. |