Skip to content
Snippets Groups Projects
Commit 5f3e2b47 authored by Marco Clemencic's avatar Marco Clemencic Committed by Sebastien Ponce
Browse files

fix for Python3

parent daffb32e
No related branches found
No related tags found
1 merge request!4224Update clang-format and switch to Ruff for Python linting and formatting
This commit is part of merge request !4224. Comments created here will be created in the context of that merge request.
...@@ -25,7 +25,7 @@ data = [] ...@@ -25,7 +25,7 @@ data = []
for path in searchPaths: for path in searchPaths:
files = sorted(glob.glob(path + "*.ldst")) files = sorted(glob.glob(path + "*.ldst"))
data += ["DATAFILE='" + file + "'" for file in files] data += ["DATAFILE='" + file + "'" for file in files]
print "Found", len(data), "data files" print("Found", len(data), "data files")
# Batch options ? # Batch options ?
if "CONDOR_FILE_BATCH" in os.environ: if "CONDOR_FILE_BATCH" in os.environ:
...@@ -36,12 +36,12 @@ if "CONDOR_FILE_BATCH" in os.environ: ...@@ -36,12 +36,12 @@ if "CONDOR_FILE_BATCH" in os.environ:
lastFile = (batch + 1) * nfiles lastFile = (batch + 1) * nfiles
if firstFile <= len(data): if firstFile <= len(data):
if lastFile > len(data): lastFile = len(data) if lastFile > len(data): lastFile = len(data)
print "Using restricted file range", firstFile, lastFile print("Using restricted file range", firstFile, lastFile)
data = data[firstFile:lastFile] data = data[firstFile:lastFile]
for f in data: for f in data:
print " ", f print(" ", f)
else: else:
print "WARNING: File range outside input data list" print("WARNING: File range outside input data list")
data = [] data = []
IOHelper('ROOT').inputFiles(data, clear=True) IOHelper('ROOT').inputFiles(data, clear=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment