MCPcopy
hub / github.com/corpnewt/gibMacOS / __init__

Method __init__

Scripts/disk.py:11–24  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

9class Disk:
10
11 def __init__(self):
12 self.r = run.Run()
13 self.diskutil = self.get_diskutil()
14 self.os_version = ".".join(
15 self.r.run({"args":["sw_vers", "-productVersion"]})[0].split(".")[:2]
16 )
17 self.full_os_version = self.r.run({"args":["sw_vers", "-productVersion"]})[0]
18 if len(self.full_os_version.split(".")) < 3:
19 # Add .0 in case of 10.14
20 self.full_os_version += ".0"
21 self.sudo_mount_version = "10.13.6"
22 self.sudo_mount_types = ["efi"]
23 self.apfs = {}
24 self._update_disks()
25
26 def _get_str(self, val):
27 # Helper method to return a string value based on input type

Callers

nothing calls this directly

Calls 3

get_diskutilMethod · 0.95
_update_disksMethod · 0.95
runMethod · 0.80

Tested by

no test coverage detected