mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[scripts/welcome] script crash on Python 3.9 on macOS
This commit is contained in:
parent
6ed0ea251c
commit
265eaa565b
1 changed files with 3 additions and 2 deletions
|
@ -188,9 +188,10 @@ def _get_distro_info():
|
||||||
if psutil.WINDOWS:
|
if psutil.WINDOWS:
|
||||||
return "windows", platform.system(), platform.release(), ""
|
return "windows", platform.system(), platform.release(), ""
|
||||||
elif psutil.OSX:
|
elif psutil.OSX:
|
||||||
from plistlib import readPlist
|
import plistlib
|
||||||
|
|
||||||
sw_vers = readPlist("/System/Library/CoreServices/SystemVersion.plist")
|
with open("/System/Library/CoreServices/SystemVersion.plist", "rb") as f:
|
||||||
|
sw_vers = plistlib.load(f)
|
||||||
return "mac", sw_vers["ProductName"], sw_vers["ProductVersion"], ""
|
return "mac", sw_vers["ProductName"], sw_vers["ProductVersion"], ""
|
||||||
elif _is_android():
|
elif _is_android():
|
||||||
from subprocess import check_output
|
from subprocess import check_output
|
||||||
|
|
Loading…
Reference in a new issue