gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-dev] [PATCH 02/12] Fixes fake.py 'packet' import for Python 3.


From: Fred Wright
Subject: [gpsd-dev] [PATCH 02/12] Fixes fake.py 'packet' import for Python 3.
Date: Fri, 8 Apr 2016 10:07:43 -0700

This changes the import of the 'packet' module to be an explicit
relative import, which is valid in both Python2 and Python 3.  The old
implicit relative import doesn't work in Python 3.

TESTED:
Ran "scons build-all check" (with Python 2.7).  Also verified that the
regression tests and test_maidenhead.py run with Python 2.6, and that
gpsfake -T and test_maidenhead.py run with Python 3 when the
extensions are built for Python 3 (not yet a build option).
---
 gps/fake.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gps/fake.py b/gps/fake.py
index a4ca01f..7041dda 100644
--- a/gps/fake.py
+++ b/gps/fake.py
@@ -74,7 +74,7 @@ from __future__ import print_function, division
 import os, sys, time, signal, pty, termios  # fcntl, array, struct
 import threading, socket, select
 import gps
-import packet as sniffer
+from . import packet as sniffer
 import stat
 
 # The magic number below has to be derived from observation.  If
-- 
2.8.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]