Skip to content

Commit d866bfa

Browse files
committed
fix kdk match
1 parent 055871c commit d866bfa

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

oclp_r/support/kdk_handler.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,22 +209,21 @@ def _get_latest_kdk(self, host_build: str = None, host_version: str = None) -> N
209209
self.kdk_url_expected_size = kdk["fileSize"]
210210
self.kdk_url_is_exactly_match = True
211211
break
212-
213212
# If no exact match, check for closest match
214213
if not self.kdk_url_is_exactly_match:
215214
count_kdks=remote_kdk_version
216215
if count_kdks:
217216
count_kdks.sort(key=lambda x: x["build"], reverse=True)
218-
219217
closest = None
220218
for kdk in count_kdks:
219+
print(ord(kdk["build"][2]))
221220
# Need same version (example: 26.3==26.3 -> 26D==26D)
222221
if kdk["build"][0:3] == host_build[0:3]:
223222
# We need to check beta versions
224223
closest=kdk
225224
break
226-
227-
elif kdk["build"][0:2] == host_build[0:2] and ord(kdk["build"][2])-1==ord(host_build[2]):
225+
226+
elif kdk["build"][0:2] == host_build[0:2] and ord(kdk["build"][2]) +1 == ord(host_build[2]):
228227
closest=kdk
229228
break
230229
if closest is None:

0 commit comments

Comments
 (0)