Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Jul 5, 2014
1 parent 6916716 commit 302978e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions PIL/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,25 @@
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

0 comments on commit 302978e

Please sign in to comment.