mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-02 17:33:37 +00:00
Change if old scandir binary module is installed, fallback to slow Python.
This commit is contained in:
parent
1a3f0e8a7e
commit
cec00f41fc
1 changed files with 6 additions and 1 deletions
|
@ -35,7 +35,12 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
ctypes = None
|
ctypes = None
|
||||||
|
|
||||||
if _scandir is None and ctypes is None:
|
if not getattr(_scandir, 'DirEntry', None):
|
||||||
|
import warnings
|
||||||
|
warnings.warn("scandir compiled _scandir C module is too old"
|
||||||
|
", using slow generic fallback")
|
||||||
|
_scandir = None
|
||||||
|
elif _scandir is None and ctypes is None:
|
||||||
import warnings
|
import warnings
|
||||||
warnings.warn("scandir can't find the compiled _scandir C module "
|
warnings.warn("scandir can't find the compiled _scandir C module "
|
||||||
"or ctypes, using slow generic fallback")
|
"or ctypes, using slow generic fallback")
|
||||||
|
|
Loading…
Reference in a new issue