mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Merge branch 'close' of https://github.com/xxyzz/calibre
This commit is contained in:
commit
183e5c3be3
@ -530,7 +530,8 @@ class Device(DeviceConfig, DevicePlugin):
|
|||||||
if not os.access(sz, os.R_OK):
|
if not os.access(sz, os.R_OK):
|
||||||
continue
|
continue
|
||||||
try:
|
try:
|
||||||
sz = int(open(sz, 'rb').read().decode('utf-8'))
|
with open(sz, 'rb') as szf:
|
||||||
|
sz = int(szf.read().decode('utf-8'))
|
||||||
except:
|
except:
|
||||||
continue
|
continue
|
||||||
if sz > 0:
|
if sz > 0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user