diff options
| author | shumkovnd <[email protected]> | 2023-11-10 14:39:34 +0300 |
|---|---|---|
| committer | shumkovnd <[email protected]> | 2023-11-10 16:42:24 +0300 |
| commit | 77eb2d3fdcec5c978c64e025ced2764c57c00285 (patch) | |
| tree | c51edb0748ca8d4a08d7c7323312c27ba1a8b79a /contrib/python/Pillow/py3/PIL/_util.py | |
| parent | dd6d20cadb65582270ac23f4b3b14ae189704b9d (diff) | |
KIKIMR-19287: add task_stats_drawing script
Diffstat (limited to 'contrib/python/Pillow/py3/PIL/_util.py')
| -rw-r--r-- | contrib/python/Pillow/py3/PIL/_util.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/contrib/python/Pillow/py3/PIL/_util.py b/contrib/python/Pillow/py3/PIL/_util.py new file mode 100644 index 00000000000..ba27b7e49e9 --- /dev/null +++ b/contrib/python/Pillow/py3/PIL/_util.py @@ -0,0 +1,19 @@ +import os +from pathlib import Path + + +def is_path(f): + return isinstance(f, (bytes, str, Path)) + + +def is_directory(f): + """Checks if an object is a string, and that it points to a directory.""" + return is_path(f) and os.path.isdir(f) + + +class DeferredError: + def __init__(self, ex): + self.ex = ex + + def __getattr__(self, elt): + raise self.ex |
