aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'yt_dlp/utils.py')
-rw-r--r--yt_dlp/utils.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py
index de0213b14..9eb47fccb 100644
--- a/yt_dlp/utils.py
+++ b/yt_dlp/utils.py
@@ -6373,3 +6373,11 @@ def traverse_dict(dictn, keys, casesense=True):
def variadic(x, allowed_types=(str, bytes)):
return x if isinstance(x, collections.abc.Iterable) and not isinstance(x, allowed_types) else (x,)
+
+
+def get_windows_version():
+ ''' Get Windows version. None if it's not running on Windows '''
+ if compat_os_name == 'nt':
+ return version_tuple(platform.win32_ver()[1])
+ else:
+ return None