# HG changeset patch # User Daniel O'Connor # Date 1313063350 -34200 # Node ID 876d951bbcc099454828b895ec97cf17234e73d5 # Parent ef713fe03db894769245e27aca9ad79de9bbc40f Redo timeout in a more sensible way (also change it to 100ms) diff -r ef713fe03db8 -r 876d951bbcc0 usb488.py --- a/usb488.py Thu Aug 11 21:18:09 2011 +0930 +++ b/usb488.py Thu Aug 11 21:19:10 2011 +0930 @@ -222,9 +222,12 @@ if wrote != len(chunk): raise "Short write, got %d, expected %d" % (wrote, len(chunk)) - def read(self, timeout = 0.2): + def read(self, timeout = None): """Read data from the device, waits for up to timeout seconds for each USB transaction""" + if timeout == None: + timeout = 0.1 + # Mangle into milliseconds _timeout = int(timeout * 1000.0)