Skip to content

Commit 91f8af7

Browse files
committed
black
1 parent 4300998 commit 91f8af7

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

payload/usr/local/sal/checkin_modules/apple_sus_checkin.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,17 +180,20 @@ def get_pending():
180180
if "recommended" in m.group("recommended")
181181
else "FALSE",
182182
"action": _bracket_cleanup(m, "action"),
183-
"type": "Apple SUS Install"
183+
"type": "Apple SUS Install",
184184
},
185185
}
186186
for m in rexp.finditer(output)
187187
}
188188

189+
189190
def get_pending_updates_from_preferences():
190191
pending = {}
191192
try:
192193
pref = plistlib.loads(
193-
pathlib.Path("/Library/Preferences/com.apple.SoftwareUpdate.plist").read_bytes()
194+
pathlib.Path(
195+
"/Library/Preferences/com.apple.SoftwareUpdate.plist"
196+
).read_bytes()
194197
)
195198
except (IOError, plistlib.InvalidFileException):
196199
return None
@@ -210,11 +213,12 @@ def get_pending_updates_from_preferences():
210213
item["data"] = {
211214
"version": version,
212215
"recommended": "TRUE",
213-
"type": "Apple SUS Install"
216+
"type": "Apple SUS Install",
214217
}
215218
pending[name] = item
216219
return pending
217220

221+
218222
def _bracket_cleanup(match, key):
219223
"""Strip out [ and ] and uppercase SUS output"""
220224
return re.sub(r"[\[\]]", "", match.group(key) or "").upper()

payload/usr/local/sal/checkin_modules/machine_checkin.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ def get_friendly_model(serial, udid):
127127
data[0]
128128
.get("product-name")
129129
.decode("ascii", "ignore")
130-
.strip().strip('\x00').strip()
130+
.strip()
131+
.strip("\x00")
132+
.strip()
131133
)
132134
except:
133135
pass

0 commit comments

Comments
 (0)