server/files: fix import for Py3.5

os.DirEntry is available only from Python3.6+.
This commit is contained in:
rr- 2017-02-05 22:38:55 +01:00
parent 4caa980bf8
commit f40a8875c4

View file

@ -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 []