From 9841bbe9b5156aede5b63a2f4920c8c07b89326f Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Tue, 28 May 2013 13:06:49 -0700 Subject: [PATCH] Missing exception --- pyad2usb/devices.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pyad2usb/devices.py b/pyad2usb/devices.py index 0a45d50..7c56bd8 100644 --- a/pyad2usb/devices.py +++ b/pyad2usb/devices.py @@ -188,9 +188,12 @@ class USBDevice(Device): """ Writes data to the device. """ - self._device.write_data(data) + try: + self._device.write_data(data) - self.on_write(data) + self.on_write(data) + except FtdiError, err: + raise util.CommError('Error writing to AD2USB device.') def read(self): """