From 8aba3aef3034008510dbf07bebc5d1e669354194 Mon Sep 17 00:00:00 2001 From: Alex Austin Date: Tue, 10 Oct 2017 12:55:43 -0500 Subject: [PATCH] Remove "print" from ACI Library --- pyaci/aci/AciEvent.py | 2 +- pyaci/aci_serial/AciUart.py | 3 ++- pyaci/upload.py | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pyaci/aci/AciEvent.py b/pyaci/aci/AciEvent.py index 28d99b4..dc34d3e 100644 --- a/pyaci/aci/AciEvent.py +++ b/pyaci/aci/AciEvent.py @@ -163,7 +163,7 @@ def __init__(self,pkt): class HeartbeatMsg(object): def __init__(self, data): if len(data) != 18: - print(str.format("Error: expected 18 bytes, got %s" %(data))) + raise ValueError("Error: expected 18 bytes, got %s" % data) (self.rssi, self.received_at, self.received_at_ms, self.local_clock_version, self.sensor_id, self.epoch_seconds, self.epoch_ms, self.clock_version) = unpack('