Skip to content

Commit

Permalink
Fixes for comparison functions
Browse files Browse the repository at this point in the history
  • Loading branch information
nothingface0 committed Jun 25, 2024
1 parent d398340 commit cd84075
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/visDQMDeleteDaemon
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ while True:
return (a > b) - (a < b)

runDS.setdefault(sample["type"], {})
for tp in sorted(sample["items"], cmp=lambda x, y: cmp(x["run"], y["run"]))[
for tp in sorted(sample["items"], key=lambda x, y: cmp(x["run"], y["run"]))[
:-1
]:
newSample = (
Expand Down
2 changes: 1 addition & 1 deletion bin/visDQMZipFreezeDaemon
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ while True:
# number) to freeze list. For the most recent one, check the
# zinfo file contents to determine if the zip is old enough to
# be frozen.
zlist = sorted(new[key], cmp=lambda x, y: cmp(x[1], y[1]), reverse=True)
zlist = sorted(new[key], key=lambda x, y: cmp(x[1], y[1]), reverse=True)
for zf in zlist[1:]:
freeze.append(zf[0])

Expand Down

0 comments on commit cd84075

Please sign in to comment.