Skip to content

Commit 70e7c22

Browse files
germa89akaszynskijleonatti
authored
Feat/updating gitignore (#616)
* Replaced python 2.7 raw_input for equivalent python 3.6 * Replaced python 2.7 raw_input for equivalent python 3.6 * Updated gitignore with VS Code settings * Removing try except block. * Format fixing * Update ansys/mapdl/core/launcher.py Co-authored-by: Alex Kaszynski <[email protected]> * Update .gitignore Co-authored-by: jleonatti <[email protected]> * Update .gitignore Co-authored-by: jleonatti <[email protected]> Co-authored-by: Alex Kaszynski <[email protected]> Co-authored-by: jleonatti <[email protected]>
1 parent 64039df commit 70e7c22

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

ansys/mapdl/core/launcher.py

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -432,14 +432,12 @@ def launch_grpc(
432432
print(f"Running {command}")
433433
subprocess.Popen(command, shell=os.name != "nt", cwd=run_location)
434434
else:
435-
subprocess.Popen(
436-
command,
437-
shell=os.name != "nt",
438-
cwd=run_location,
439-
stdin=subprocess.DEVNULL,
440-
stdout=subprocess.DEVNULL,
441-
stderr=subprocess.DEVNULL,
442-
)
435+
subprocess.Popen(command,
436+
shell=os.name != 'nt',
437+
cwd=run_location,
438+
stdin=subprocess.DEVNULL,
439+
stdout=subprocess.DEVNULL,
440+
stderr=subprocess.DEVNULL)
443441

444442
# watch for the creation of temporary files at the run_directory.
445443
# This lets us know that the MAPDL process has at least started
@@ -645,12 +643,9 @@ def save_ansys_path(exe_loc=""):
645643
return exe_loc
646644

647645
# otherwise, query user for the location
648-
with open(CONFIG_FILE, "w") as f:
649-
print("Cached ANSYS executable not found")
650-
try:
651-
exe_loc = raw_input("Enter location of ANSYS executable: ")
652-
except NameError:
653-
exe_loc = input("Enter location of ANSYS executable: ")
646+
with open(CONFIG_FILE, 'w') as f:
647+
print('Cached ANSYS executable not found')
648+
exe_loc = input('Enter location of ANSYS executable: ')
654649
if not os.path.isfile(exe_loc):
655650
raise FileNotFoundError(
656651
"ANSYS executable not found at this location:\n%s" % exe_loc

0 commit comments

Comments
 (0)