]> jfr.im git - yt-dlp.git/commitdiff
Fix e0c4db04dc82a699bdabd9821ddc239ebe17d30a for pypy
authorpukkandan <redacted>
Sat, 22 Jul 2023 04:47:36 +0000 (10:17 +0530)
committerpukkandan <redacted>
Sat, 22 Jul 2023 04:47:36 +0000 (10:17 +0530)
yt_dlp/compat/types.py

index ae7024564226fc2fad5d9ece86ab4e995e63dd28..4aa3b0efdd38cd486bfcef254839e7dd9d65405c 100644 (file)
@@ -7,6 +7,7 @@
 del passthrough_module
 
 try:
-    NoneType  # >= 3.10
-except NameError:
+    # NB: pypy has builtin NoneType, so checking NameError won't work
+    from types import NoneType  # >= 3.10
+except ImportError:
     NoneType = type(None)