From 302978e4644269f87f1259458819e4d59efb4117 Mon Sep 17 00:00:00 2001 From: hugovk Date: Sun, 6 Jul 2014 01:50:24 +0300 Subject: [PATCH] flake8 --- PIL/_util.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PIL/_util.py b/PIL/_util.py index eb5c2c242..51c6f6887 100644 --- a/PIL/_util.py +++ b/PIL/_util.py @@ -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