mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-04-14 01:23:32 +02:00
Removed check for python version
This commit is contained in:
@@ -5,7 +5,7 @@ import os, subprocess, shutil, re
|
||||
from functools import partial
|
||||
|
||||
from ebook_converter import prints
|
||||
from ebook_converter.constants import iswindows, ispy3
|
||||
from ebook_converter.constants import iswindows
|
||||
from ebook_converter.ptempfile import TemporaryDirectory
|
||||
from ebook_converter.ebooks.metadata import (
|
||||
MetaInformation, string_to_authors, check_isbn, check_doi)
|
||||
@@ -101,8 +101,6 @@ def page_images(pdfpath, outputdir='.', first=1, last=1, image_format='jpeg', pr
|
||||
|
||||
|
||||
def is_pdf_encrypted(path_to_pdf):
|
||||
if not ispy3 and not isinstance(path_to_pdf, bytes):
|
||||
path_to_pdf = path_to_pdf.encode('mbcs' if iswindows else 'utf-8')
|
||||
pdfinfo = get_tools()[0]
|
||||
raw = subprocess.check_output([pdfinfo, path_to_pdf])
|
||||
q = re.search(br'^Encrypted:\s*(\S+)', raw, flags=re.MULTILINE)
|
||||
|
||||
Reference in New Issue
Block a user