server/files: fix import for Py3.5
os.DirEntry is available only from Python3.6+.
This commit is contained in:
parent
4caa980bf8
commit
f40a8875c4
1 changed files with 1 additions and 1 deletions
|
@ -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 []
|
||||||
|
|
Loading…
Reference in a new issue