Use snake nameing scheme

This commit is contained in:
Mykola Grymalyuk
2021-10-03 13:35:01 -06:00
parent b9a5ba7897
commit e33997320b
26 changed files with 26 additions and 26 deletions
+19
View File
@@ -0,0 +1,19 @@
# Probe for OS data
import platform
import subprocess
def detect_kernel_major():
# Return Major Kernel Version
# Example Output: 21 (integer)
return int(platform.uname().release.partition(".")[0])
def detect_kernel_minor():
# Return Minor Kernel Version
# Example Output: 1 (integer)
return int(platform.uname().release.partition(".")[2].partition(".")[0])
def detect_kernel_build():
# Return OS build
# Example Output: 21A5522h (string)
return subprocess.run("sw_vers -buildVersion".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()