From 58892090ce38331b9865869eab0f74c36004111d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 20 Feb 2010 11:33:16 -0700 Subject: [PATCH] USBMS: Sleep a little before retyring a copy to device --- src/calibre/devices/usbms/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/devices/usbms/cli.py b/src/calibre/devices/usbms/cli.py index 67d457efe1..829267a0b8 100644 --- a/src/calibre/devices/usbms/cli.py +++ b/src/calibre/devices/usbms/cli.py @@ -4,8 +4,7 @@ __license__ = 'GPL 3' __copyright__ = '2009, John Schember ' __docformat__ = 'restructuredtext en' -import os -import shutil +import os, shutil, time from calibre.devices.errors import PathError @@ -55,6 +54,7 @@ class CLI(object): shutil.copyfileobj(infile, dest) except IOError: print 'WARNING: First attempt to send file to device failed' + time.sleep(0.2) infile.seek(0) dest.seek(0) dest.truncate()