ignore non utf-8 output
This commit is contained in:
parent
e260950c88
commit
24a6bb7c03
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ def pdfinfo(pdf):
|
||||||
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
|
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
|
||||||
stdout, stderr = p.communicate()
|
stdout, stderr = p.communicate()
|
||||||
data = {}
|
data = {}
|
||||||
for line in stdout.decode('utf-8').strip().split('\n'):
|
for line in stdout.decode('utf-8', 'replace').strip().split('\n'):
|
||||||
parts = line.split(':')
|
parts = line.split(':')
|
||||||
key = parts[0].lower().strip()
|
key = parts[0].lower().strip()
|
||||||
if key:
|
if key:
|
||||||
|
|
Loading…
Reference in a new issue