[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gpsd-dev] [PATCH 1/6] webgps.py: fix import error when running directly
From: |
Beat Bolli |
Subject: |
[gpsd-dev] [PATCH 1/6] webgps.py: fix import error when running directly from contrib/ |
Date: |
Mon, 21 Oct 2013 20:34:56 +0200 |
---
contrib/webgps.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/contrib/webgps.py b/contrib/webgps.py
index eecf8dc..8ab0ac4 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
--
1.8.4.rc3
- [gpsd-dev] [PATCH 1/6] webgps.py: fix import error when running directly from contrib/,
Beat Bolli <=