Fix error handling for data construct on init.

This commit is contained in:
Nick Foster
2012-07-02 07:17:21 -07:00
parent 19436349dc
commit fe6aa0c6de
3 changed files with 15 additions and 8 deletions

View File

@@ -32,7 +32,6 @@ class modes_output_print(modes_parse.modes_parse):
def parse(self, message):
[data, ecc, reference, timestamp] = message.split()
data = modes_parse.modes_reply(long(data, 16))
ecc = long(ecc, 16)
reference = float(reference)
timestamp = float(timestamp)
@@ -45,6 +44,7 @@ class modes_output_print(modes_parse.modes_parse):
output = "(%.0f %.10f) " % (refdb, timestamp);
try:
data = modes_parse.modes_reply(long(data, 16))
msgtype = data["df"]
if msgtype == 0:
output += self.print0(data, ecc)