Closed PierreRaybaut closed 2 years ago
Hi, thanks for your contribution. This would indeed solve the ValueError
, but it would not allow darkdetect
to work on e.g. Windows Server 2008 R2. Is this acceptable for you?
Absolutely because there is no dark mode on Windows Server 2008 anyway. Actually, because the same software using darkdetect is deployed on Windows machines supporting dark mode (e.g. Windows 10) and others (e.g. Windows 7 or Server 2008), we just need darkdetect to do nothing if dark mode is not supported.
This changes avoids throwing a ValueError when trying to convert platform.release() into an integer (platform.release() does not necessarily return an integer: on Windows Server 2008 R2, it returns '2008ServerR2' for example).