mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
server/files: fix import for Py3.5
os.DirEntry is available only from Python3.6+.
This commit is contained in:
@ -17,7 +17,7 @@ def has(path: str) -> bool:
|
|||||||
return os.path.exists(_get_full_path(path))
|
return os.path.exists(_get_full_path(path))
|
||||||
|
|
||||||
|
|
||||||
def scan(path: str) -> List[os.DirEntry]:
|
def scan(path: str) -> List[Any]:
|
||||||
if has(path):
|
if has(path):
|
||||||
return list(os.scandir(_get_full_path(path)))
|
return list(os.scandir(_get_full_path(path)))
|
||||||
return []
|
return []
|
||||||
|
Reference in New Issue
Block a user