Skip to content

Commit

Permalink
Fix some dict_keys which were supposed to be lists
Browse files Browse the repository at this point in the history
  • Loading branch information
nothingface0 committed Jun 18, 2024
1 parent 9774457 commit fbacaee
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/python/DQM/GUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ def samples(self, *args, **options):
sources = dict(
(s.plothook, s) for s in self.server.sources if getattr(s, "plothook", None)
)
(stamp, result) = self._samples(sources.values(), options)
(stamp, result) = self._samples(list(sources.values()), options)
response.headers["Content-Type"] = "text/plain"
response.headers["Last-Modified"] = httputil.HTTPDate(stamp)
return result
Expand Down Expand Up @@ -675,7 +675,7 @@ def plot(self, *path, **options):
if srcname in sources and srcname != "unknown":
info = (sources[srcname], int(runnr), "/" + dataset)

a = self._plot(sources.values(), info, "/".join(path), options)
a = self._plot(list(sources.values()), info, "/".join(path), options)
return (a[0], bytes(a[1]))


Expand Down
4 changes: 4 additions & 0 deletions src/python/Overview/CAF.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
import time, json, re


def cmp(a, b):
return (a > b) - (a < b)


class CAFDataProvider(Thread):
DATAURL = (
"http://cmsweb.cern.ch/phedex/datasvc/json/prod/blockreplicas?node=T2_CH_CAF"
Expand Down
2 changes: 1 addition & 1 deletion src/python/Overview/ProdMon.py
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,7 @@ def _getWFSummary(self):
def _getWFTop(self, count, sortkey="MERGED_EVTS"):
wfsummary = self.cache.cacheFetch("PA_WFSUMMARY", self._getWFSummary)

wflist = wfsummary.keys()
wflist = list(wfsummary.keys())
wflist.sort(key=lambda x: int(wfsummary[x][sortkey]))
wflist.reverse()
wflist = wflist[0:count]
Expand Down
2 changes: 1 addition & 1 deletion test/python/test-dqm-mt3.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def plot(self, *path, **options):
)
(srcname, runnr, dataset) = options.get("current").split("/", 2)
info = (sources[srcname], int(runnr), "/" + dataset)
return self._plot(sources.values(), info, "/".join(path), options)
return self._plot(list(sources.values()), info, "/".join(path), options)


wsnames = []
Expand Down

0 comments on commit fbacaee

Please sign in to comment.