mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 20:35:18 +02:00
Merge branch 'close' of https://github.com/xxyzz/calibre
This commit is contained in:
commit
183e5c3be3
1 changed files with 2 additions and 1 deletions
|
|
@ -530,7 +530,8 @@ def find_largest_partition(self, path):
|
|||
if not os.access(sz, os.R_OK):
|
||||
continue
|
||||
try:
|
||||
sz = int(open(sz, 'rb').read().decode('utf-8'))
|
||||
with open(sz, 'rb') as szf:
|
||||
sz = int(szf.read().decode('utf-8'))
|
||||
except:
|
||||
continue
|
||||
if sz > 0:
|
||||
|
|
|
|||
Loading…
Reference in a new issue