Skip to content

Commit bf0b14c

Browse files
committed
Fix usage of f-string for older Python versions
1 parent 4433a31 commit bf0b14c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

bindings/pyroot/pythonizations/python/ROOT/_rootcli.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88
def main() -> None:
99
# Ensure all ROOT libraries are found at runtime by the process
1010
os.environ['LD_LIBRARY_PATH'] = os.path.join(ROOT_HOME, 'lib')
11-
# Finds the ROOT process from the current installation directory
12-
rootexe = os.path.join(ROOT_HOME, 'bin', 'root.exe')
11+
# Finds the ROOT executable from the current installation directory
12+
bindir = os.path.join(ROOT_HOME, 'bin')
13+
rootexe = os.path.join(bindir, 'root.exe')
1314
if not os.path.exists(rootexe):
14-
msg = (f"Could not find 'root' executable in directory '{os.path.join(ROOT_HOME, "bin")}'. "
15-
"Something is wrong in the ROOT installation.")
16-
raise FileNotFoundError(msg)
15+
raise FileNotFoundError(
16+
f"Could not find 'root' executable in directory '{bindir}'. "
17+
"Something is wrong in the ROOT installation.")
1718
# Make sure command line arguments are preserved
1819
args = [rootexe] + sys.argv[1:]
1920
# Run the actual ROOT executable and return the exit code to the main Python process

0 commit comments

Comments
 (0)