Skip to content

Commit 027f7b0

Browse files
committed
make relmon py3 compatible
1 parent f69783f commit 027f7b0

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Utilities/RelMon/python/directories2html.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from builtins import range
1515
from os import chdir,getcwd,listdir,makedirs
1616
from os.path import basename,join,exists
17-
import cgi
17+
import html
1818

1919
import sys
2020
theargv=sys.argv
@@ -508,7 +508,7 @@ def build_gauge(total_success_rate,minrate=.80,small=False,escaped=False):
508508
gauge_link+="&chma=10,10,10,0"
509509
img_tag= '<img src="%s">'%gauge_link
510510
if escaped:
511-
img_tag=cgi.escape(img_tag)
511+
img_tag=html.escape(img_tag)
512512
return img_tag
513513

514514
#-------------------------------------------------------------------------------
@@ -624,7 +624,7 @@ def make_categories_summary(dir_dict,aggregation_rules):
624624
def make_twiki_table(dir_dict,aggregation_rules):
625625

626626
# decide the release
627-
meta= dir_dict.items()[0][1].meta
627+
meta= list(dir_dict.items())[0][1].meta
628628
releases=sorted([meta.release1,meta.release2])
629629
latest_release=releases[1].split("-")[0]
630630

Utilities/RelMon/scripts/ValidationMatrix.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from optparse import OptionParser
1515

1616
import os
17-
import cPickle
17+
import pickle
1818
import glob
1919
from re import search
2020
from subprocess import call,PIPE
@@ -253,8 +253,8 @@ def get_filenames_from_pool(all_samples):
253253

254254
def get_clean_fileanames(ref_samples,test_samples):
255255
# Process the samples starting from the names
256-
ref_filenames=map(lambda s:s.strip(),ref_samples.split(","))
257-
test_filenames=map(lambda s:s.strip(),test_samples.split(","))
256+
ref_filenames=list(map(lambda s:s.strip(),ref_samples.split(",")))
257+
test_filenames=list(map(lambda s:s.strip(),test_samples.split(",")))
258258

259259
if len(ref_filenames)!=len(test_filenames):
260260
print("The numebr of reference and test files does not seem to be the same. Please check.")
@@ -325,8 +325,8 @@ def do_comparisons_threaded(options):
325325
ref_filenames,test_filenames=get_clean_fileanames(options.ref_samples,options.test_samples)
326326

327327
# make the paths absolute
328-
ref_filenames=map(os.path.abspath,ref_filenames)
329-
test_filenames=map(os.path.abspath,test_filenames)
328+
ref_filenames=list(map(os.path.abspath,ref_filenames))
329+
test_filenames=list(map(os.path.abspath,test_filenames))
330330

331331
samples,cmssw_version1,cmssw_version2=guess_params(ref_filenames,test_filenames)
332332

0 commit comments

Comments
 (0)