summaryrefslogtreecommitdiff
path: root/contrib/webgps.py
diff options
context:
space:
mode:
authorBeat Bolli <bbolli@ewanet.ch>2013-10-21 20:34:56 +0200
committerEric S. Raymond <esr@thyrsus.com>2013-10-22 13:37:05 -0400
commit11c2e2e8906dab0ede540263990942f76a9d9577 (patch)
tree93e7bff3094e90731089c74bc9071af189c38ec0 /contrib/webgps.py
parent68ac1b8304272877820226e765142221e88ec294 (diff)
downloadgpsd-11c2e2e8906dab0ede540263990942f76a9d9577.tar.gz
webgps.py: fix import error when running directly from contrib/
Diffstat (limited to 'contrib/webgps.py')
-rwxr-xr-xcontrib/webgps.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/webgps.py b/contrib/webgps.py
index eecf8dcb..8ab0ac40 100755
--- a/contrib/webgps.py
+++ b/contrib/webgps.py
@@ -8,7 +8,11 @@
#
import time, calendar, math, socket, sys, os, select, pickle
-from gps import *
+try:
+ from gps import *
+except ImportError:
+ sys.path.append('..')
+ from gps import *
TRACKMAX = 1024
STALECOUNT = 10