Skip to content

Commit 326bc61

Browse files
committed
Make sure that the GetDevelopmentTeamID can handle ad-hoc signing
1 parent 864a2b2 commit 326bc61

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

build_scripts/apple_utils.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,8 @@ def GetCodeSigningIdentifiers() -> Dict[str, str]:
181181
XcodeVersion = GetXcodeVersion()[0]
182182
codeSignIDs = _GetCodeSignStringFromTerminal()
183183

184-
if not codeSignIDs:
185-
return {"-": None}
186-
187184
identifiers = {}
188-
for codeSignID in codeSignIDs.splitlines():
185+
for codeSignID in (codeSignIDs or "").splitlines():
189186
if "CSSMERR_TP_CERT_REVOKED" in codeSignID:
190187
continue
191188
if ")" not in codeSignID:
@@ -200,9 +197,7 @@ def GetCodeSigningIdentifiers() -> Dict[str, str]:
200197

201198
identifiers[identifier] = identifier_hash
202199

203-
if not identifiers:
204-
raise RuntimeError("Could not find a valid codesigning ID. Try re-logging into your Xcode developer account.")
205-
200+
identifiers["-"] = None
206201
return identifiers
207202

208203

@@ -225,6 +220,8 @@ def GetDevelopmentTeamID(identifier=None):
225220

226221
if not identifier:
227222
identifier = GetCodeSignID()
223+
if identifier == "-":
224+
return None
228225

229226
identifier_hash = GetCodeSigningIdentifiers().get(identifier)
230227
if not identifier_hash:

0 commit comments

Comments
 (0)