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