Skip to content

Commit 4d0d6fe

Browse files
FIX: Revert f-string (#5404)
1 parent c4a1475 commit 4d0d6fe

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/ansys/aedt/core/workflows/templates/pyaedt_utils.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141

4242
def set_ansys_em_environment(oDesktop):
43-
variable = f"ANSYSEM_ROOT{oDesktop.GetVersion()[2:6].replace('.', '')}"
43+
variable = "ANSYSEM_ROOT{}".format(oDesktop.GetVersion()[2:6].replace(".", ""))
4444
if variable not in os.environ:
4545
os.environ[variable] = oDesktop.GetExeDir()
4646

@@ -57,8 +57,8 @@ def sanitize_interpreter_path(interpreter_path, version):
5757
def check_file(file_path, oDesktop):
5858
if not os.path.isfile(file_path):
5959
show_error(
60-
f'"{file_path}" does not exist. Install PyAEDT using the Python script installer from the PyAEDT '
61-
"documentation.",
60+
'"{}" does not exist. Install PyAEDT using the Python script installer from the PyAEDT '
61+
"documentation.".format(file_path),
6262
oDesktop,
6363
)
6464
return False
@@ -111,34 +111,34 @@ def environment_variables(oDesktop):
111111
os.environ["PYAEDT_STUDENT_VERSION"] = "False"
112112
if is_linux:
113113
edt_root = os.path.normpath(oDesktop.GetExeDir())
114-
os.environ[f"ANSYSEM_ROOT{version}"] = edt_root
114+
os.environ["ANSYSEM_ROOT{}".format(version)] = edt_root
115115
ld_library_path_dirs_to_add = [
116-
f"{edt_root}/commonfiles/CPython/3_7/linx64/Release/python/lib",
117-
f"{edt_root}/commonfiles/CPython/3_10/linx64/Release/python/lib",
118-
f"{edt_root}/common/mono/Linux64/lib64",
119-
f"{edt_root}/Delcross",
120-
f"{edt_root}",
116+
"{}/commonfiles/CPython/3_7/linx64/Release/python/lib".format(edt_root),
117+
"{}/commonfiles/CPython/3_10/linx64/Release/python/lib".format(edt_root),
118+
"{}/common/mono/Linux64/lib64".format(edt_root),
119+
"{}/Delcross".format(edt_root),
120+
"{}".format(edt_root),
121121
]
122122
os.environ["LD_LIBRARY_PATH"] = ":".join(ld_library_path_dirs_to_add) + ":" + os.getenv("LD_LIBRARY_PATH", "")
123123
if version > "2023.1":
124124
os.environ["TCL_LIBRARY"] = os.path.join(
125-
f"{edt_root}/commonfiles/CPython/3_10/linx64/Release/python/lib", "tcl8.5"
125+
"{}/commonfiles/CPython/3_10/linx64/Release/python/lib".format(edt_root), "tcl8.5"
126126
)
127127
os.environ["TK_LIBRARY"] = os.path.join(
128-
f"{edt_root}/commonfiles/CPython/3_10/linx64/Release/python/lib", "tk8.5"
128+
"{}/commonfiles/CPython/3_10/linx64/Release/python/lib".format(edt_root), "tk8.5"
129129
)
130130
os.environ["TKPATH"] = os.path.join(
131-
f"{edt_root}/commonfiles/CPython/3_10/linx64/Release/python/lib", "tk8.5"
131+
"{}/commonfiles/CPython/3_10/linx64/Release/python/lib".format(edt_root), "tk8.5"
132132
)
133133
else:
134134
os.environ["TCL_LIBRARY"] = os.path.join(
135-
f"{edt_root}/commonfiles/CPython/3_7/linx64/Release/python/lib", "tcl8.5"
135+
"{}/commonfiles/CPython/3_7/linx64/Release/python/lib".format(edt_root), "tcl8.5"
136136
)
137137
os.environ["TK_LIBRARY"] = os.path.join(
138-
f"{edt_root}/commonfiles/CPython/3_7/linx64/Release/python/lib", "tk8.5"
138+
"{}/commonfiles/CPython/3_7/linx64/Release/python/lib".format(edt_root), "tk8.5"
139139
)
140140
os.environ["TKPATH"] = os.path.join(
141-
f"{edt_root}/commonfiles/CPython/3_7/linx64/Release/python/lib", "tk8.5"
141+
"{}/commonfiles/CPython/3_7/linx64/Release/python/lib".format(edt_root), "tk8.5"
142142
)
143143

144144

0 commit comments

Comments
 (0)