Skip to content

Commit

Permalink
Merge pull request #29534 from silviodonato/fix-DQM-UT
Browse files Browse the repository at this point in the history
 Fix DQM/Integration unit test in PY3
  • Loading branch information
cmsbuild authored Apr 22, 2020
2 parents ee0a261 + dba01c2 commit 50e4a92
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions DQM/Integration/python/config/unittestinputsource_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Parameters for runType
import FWCore.ParameterSet.VarParsing as VarParsing
import fnmatch
import subprocess
from future.moves import subprocess
from .dqmPythonTypes import *

# part of the runTheMatrix magic
Expand Down Expand Up @@ -86,8 +86,8 @@
command = "edmFileUtil --catalog file:/cvmfs/cms-ib.cern.ch/SITECONF/local/PhEDEx/storage.xml?protocol=xrootd --events %s | tail -n +9 | head -n -5 | awk '{ print $3 }'" % read[0]
print(command)
events = subprocess.check_output(command, shell=True)
events = events.split('\n')
events = filter(lambda x: x != "", events)
events = events.split(b'\n')
events = filter(lambda x: x != b"", events)
events = map(int, events)
events = sorted(events)
events = events[-options.eventsPerLumi:]
Expand Down

0 comments on commit 50e4a92

Please sign in to comment.