mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 13:57:23 +02:00
Dont fail if the workaround for linux brokenness raise an exception
This commit is contained in:
parent
5b1941a833
commit
ce01b4c571
1 changed files with 7 additions and 3 deletions
|
|
@ -673,6 +673,10 @@ def fsync(fileobj):
|
|||
# To check for the existence of the bug, simply run:
|
||||
# python -c "p = '/run/media/kovid/Kindle/driveinfo.calibre'; f = open(p, 'r+b'); os.fsync(f.fileno());"
|
||||
# this will cause the Kindle to disconnect.
|
||||
with open(fileobj.name + '.linux-sucks', 'wb') as f:
|
||||
f.write(b'I cannot believe I need to do this')
|
||||
os.remove(f.name)
|
||||
try:
|
||||
with open(fileobj.name + '.linux-sucks', 'wb') as f:
|
||||
f.write(b'I cannot believe I need to do this')
|
||||
os.remove(f.name)
|
||||
except Exception:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
|
|
|
|||
Loading…
Reference in a new issue