mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-24 08:14:10 +03:00
Rename import_err to something more general
This commit is contained in:
parent
1256fb496e
commit
b27ef76468
|
@ -89,8 +89,8 @@ try:
|
||||||
except ImportError as ex:
|
except ImportError as ex:
|
||||||
# Allow error import for doc purposes, but error out when accessing
|
# Allow error import for doc purposes, but error out when accessing
|
||||||
# anything in core.
|
# anything in core.
|
||||||
from _util import import_err
|
from _util import deferred_error
|
||||||
_imagingcms = import_err(ex)
|
_imagingcms = deferred_error(ex)
|
||||||
from PIL._util import isStringType
|
from PIL._util import isStringType
|
||||||
|
|
||||||
core = _imagingcms
|
core = _imagingcms
|
||||||
|
|
|
@ -15,7 +15,7 @@ else:
|
||||||
def isDirectory(f):
|
def isDirectory(f):
|
||||||
return isPath(f) and os.path.isdir(f)
|
return isPath(f) and os.path.isdir(f)
|
||||||
|
|
||||||
class import_err(object):
|
class deferred_error(object):
|
||||||
def __init__(self, ex):
|
def __init__(self, ex):
|
||||||
self.ex = ex
|
self.ex = ex
|
||||||
def __getattr__(self, elt):
|
def __getattr__(self, elt):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user