mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 18:26:17 +03:00
flake8
This commit is contained in:
parent
691671624c
commit
302978e464
|
@ -3,20 +3,25 @@ import os
|
||||||
if bytes is str:
|
if bytes is str:
|
||||||
def isStringType(t):
|
def isStringType(t):
|
||||||
return isinstance(t, basestring)
|
return isinstance(t, basestring)
|
||||||
|
|
||||||
def isPath(f):
|
def isPath(f):
|
||||||
return isinstance(f, basestring)
|
return isinstance(f, basestring)
|
||||||
else:
|
else:
|
||||||
def isStringType(t):
|
def isStringType(t):
|
||||||
return isinstance(t, str)
|
return isinstance(t, str)
|
||||||
|
|
||||||
def isPath(f):
|
def isPath(f):
|
||||||
return isinstance(f, (bytes, str))
|
return isinstance(f, (bytes, str))
|
||||||
|
|
||||||
|
|
||||||
# Checks if an object is a string, and that it points to a directory.
|
# Checks if an object is a string, and that it points to a directory.
|
||||||
def isDirectory(f):
|
def isDirectory(f):
|
||||||
return isPath(f) and os.path.isdir(f)
|
return isPath(f) and os.path.isdir(f)
|
||||||
|
|
||||||
|
|
||||||
class deferred_error(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):
|
||||||
raise self.ex
|
raise self.ex
|
||||||
|
|
Loading…
Reference in New Issue
Block a user