Remove unicode_literals to detect empty parsing
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
import os
|
||||
import slate
|
||||
@@ -88,7 +86,7 @@ class SlateParser(Parser):
|
||||
pdf_pages = slate.PDF(descriptor)
|
||||
descriptor.close()
|
||||
|
||||
if pdf_pages[document_page.page_number - 1] == b'\x0c':
|
||||
if pdf_pages[document_page.page_number - 1] == '\x0c':
|
||||
raise ParserError
|
||||
|
||||
document_page.content = pdf_pages[document_page.page_number - 1]
|
||||
@@ -164,7 +162,7 @@ class PopplerParser(Parser):
|
||||
raise ParserError
|
||||
|
||||
output = proc.stdout.read()
|
||||
if output == b'\x0c':
|
||||
if output == '\x0c':
|
||||
logger.debug('Parser didn\'t any output')
|
||||
raise ParserError('No output')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user