File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -39,39 +39,39 @@ def get_os_info():
3939 """
4040 os_name = ""
4141 os_version = ""
42-
42+
4343 platform_name = sys .platform
44-
44+
4545 if platform_name .startswith ("win" ):
4646 os_name = "Windows"
4747 if hasattr (platform , "win32_ver" ):
4848 win_version = platform .win32_ver ()[0 ]
4949 if win_version :
5050 os_version = win_version
51-
51+
5252 elif platform_name == "darwin" :
5353 os_name = "Mac OS X"
5454 if hasattr (platform , "mac_ver" ):
5555 mac_version = platform .mac_ver ()[0 ]
5656 if mac_version :
5757 os_version = mac_version
58-
58+
5959 elif platform_name .startswith ("linux" ):
6060 os_name = "Linux"
6161 linux_info = distro .info ()
6262 if linux_info ["version" ]:
6363 os_version = linux_info ["version" ]
64-
64+
6565 elif platform_name .startswith ("freebsd" ):
6666 os_name = "FreeBSD"
6767 if hasattr (platform , "release" ):
6868 os_version = platform .release ()
69-
69+
7070 else :
7171 os_name = platform_name
7272 if hasattr (platform , "release" ):
7373 os_version = platform .release ()
74-
74+
7575 return os_name , os_version
7676
7777
You can’t perform that action at this time.
0 commit comments