[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gpsd-dev] [PATCH] Restores json_error definition accidentally removed b
From: |
Fred Wright |
Subject: |
[gpsd-dev] [PATCH] Restores json_error definition accidentally removed by 94cb114. |
Date: |
Wed, 13 Apr 2016 15:50:06 -0700 |
TESTED:
Ran "scons check". Note that this doesn't test the actual change,
since the exception in question is only used in certain error cases.
---
gps/client.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gps/client.py b/gps/client.py
index 3825bcf..5715dfe 100644
--- a/gps/client.py
+++ b/gps/client.py
@@ -134,6 +134,13 @@ WATCH_PPS = 0x002000 # enable PPS in raw/NMEA
WATCH_DEVICE = 0x000800 # watch specific device
+class json_error(BaseException):
+ def __init__(self, data, explanation):
+ BaseException.__init__(self)
+ self.data = data
+ self.explanation = explanation
+
+
class gpsjson(object):
"Basic JSON decoding."
--
2.8.1