summaryrefslogtreecommitdiff
path: root/gps/gps.py
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-03-03 01:42:28 +0000
committerEric S. Raymond <esr@thyrsus.com>2010-03-03 01:42:28 +0000
commita1cf506d8c68df0a61f691a0f691cfc4f4fc9ec0 (patch)
tree417b13ee06d0f7e57bb93fc790c49f70efddb8e9 /gps/gps.py
parentcaeeffe28ec3a3b5ffeddd134916815dd3be057c (diff)
downloadgpsd-a1cf506d8c68df0a61f691a0f691cfc4f4fc9ec0.tar.gz
Fix a packaging error in 2.91, and make the json module import more robust.release-2.92
Diffstat (limited to 'gps/gps.py')
-rwxr-xr-xgps/gps.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gps/gps.py b/gps/gps.py
index cd64c0d5..33a604a3 100755
--- a/gps/gps.py
+++ b/gps/gps.py
@@ -5,9 +5,9 @@
#
import time, calendar, math, socket, sys, select
-try:
+if sys.hexversion >= 0x2060000:
import json # For Python 2.6
-except ImportError:
+else:
import simplejson as json # For Python 2.4 and 2.5
api_major_version = 3 # bumped on incompatible changes