1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-20 05:03:35 +02:00

Removed superfluous lopen builtin

This commit is contained in:
2020-04-20 21:12:22 +02:00
parent 3ca3f08054
commit 9e076e0af4
38 changed files with 107 additions and 195 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ def what(file, h=None):
' Recognize image headers '
if h is None:
if isinstance(file, (str, bytes)):
with lopen(file, 'rb') as f:
with open(file, 'rb') as f:
h = f.read(HSIZE)
else:
location = file.tell()
@@ -41,7 +41,7 @@ def identify(src):
width = height = -1
if isinstance(src, str):
stream = lopen(src, 'rb')
stream = open(src, 'rb')
elif isinstance(src, bytes):
stream = ReadOnlyFileBuffer(src)
else: