Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not rename built-in 'dir'. #4333

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions _unittest_solvers/test_26_emit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1207,8 +1207,8 @@ def do_run():
dot_ansys_directory = os.path.join(appdata_local_path, '.ansys')

license_file_path = ''
with os.scandir(dot_ansys_directory) as dir:
for file in dir:
with os.scandir(dot_ansys_directory) as directory:
for file in directory:
filename_pieces = file.name.split('.')
# Since machine names can contain periods, there may be over five splits here
# We only care about the first split and last three splits
Expand Down Expand Up @@ -1253,7 +1253,7 @@ def count_license_actions(license_file_path):
for i in range(number_of_runs):
do_run()

# Run with license session
# Run with license session
with revision.get_license_session():
for i in range(number_of_runs):
do_run()
Expand Down
7 changes: 3 additions & 4 deletions pyaedt/application/Analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1988,10 +1988,9 @@ def solve_in_batch(
batch_run.extend(options)
batch_run.append(filename)

"""
check for existing solution directory and delete if present so we
dont have old .asol files etc
"""
# check for existing solution directory and delete it if it exists so we
# don't have old .asol files etc

self.logger.info("Solving model in batch mode on " + machine)
if run_in_thread and is_windows:
DETACHED_PROCESS = 0x00000008
Expand Down