From f40a8875c441f34065df1ffd5afacdfc948f50a1 Mon Sep 17 00:00:00 2001 From: rr- Date: Sun, 5 Feb 2017 22:38:55 +0100 Subject: [PATCH] server/files: fix import for Py3.5 os.DirEntry is available only from Python3.6+. --- server/szurubooru/func/files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/szurubooru/func/files.py b/server/szurubooru/func/files.py index 0a992ee4..fa9f36fd 100644 --- a/server/szurubooru/func/files.py +++ b/server/szurubooru/func/files.py @@ -17,7 +17,7 @@ def has(path: str) -> bool: return os.path.exists(_get_full_path(path)) -def scan(path: str) -> List[os.DirEntry]: +def scan(path: str) -> List[Any]: if has(path): return list(os.scandir(_get_full_path(path))) return []