Merge pull request #6 from GreenLightGo/hotfix/strict-setting
change STRICT to be a settings attributepull/7/head
commit
bc8d631a7c
|
@ -5,6 +5,12 @@ import re
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import six # Python 2+3 compatibility
|
import six # Python 2+3 compatibility
|
||||||
|
try:
|
||||||
|
from django.conf import settings
|
||||||
|
except ImportError:
|
||||||
|
# in case it's not a django project
|
||||||
|
settings = None
|
||||||
|
|
||||||
|
|
||||||
def bytesindex(s,i,j=None):
|
def bytesindex(s,i,j=None):
|
||||||
"""implements s[i], s[i:], s[i:j] for Python2 and Python3"""
|
"""implements s[i], s[i:], s[i:j] for Python2 and Python3"""
|
||||||
|
@ -15,7 +21,7 @@ def bytesindex(s,i,j=None):
|
||||||
|
|
||||||
from .utils import choplist
|
from .utils import choplist
|
||||||
|
|
||||||
STRICT = True
|
STRICT = getattr(settings, 'PDF_MINER_IS_STRICT', True)
|
||||||
|
|
||||||
## PS Exceptions
|
## PS Exceptions
|
||||||
##
|
##
|
||||||
|
|
Loading…
Reference in New Issue