Skip to content

Commit

Permalink
review: applying @germa89's suggestions - 2
Browse files Browse the repository at this point in the history
  • Loading branch information
clatapie committed Oct 21, 2024
1 parent 19cbea9 commit 2235a19
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ansys/mapdl/core/mapdl_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2313,7 +2313,7 @@ def __del__(self):
if self._log is not None:
self._log.error("exit: %s", str(e))
except ValueError:
logger.warning(f"Unable to exit the MAPDL session.")
pass

def _cleanup_loggers(self):
"""Clean up all the loggers"""
Expand Down
4 changes: 2 additions & 2 deletions src/ansys/mapdl/core/mapdl_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -890,8 +890,8 @@ def _launch(self, start_parm, timeout=10):
except MapdlRuntimeError:
warn("PyMAPDL is taking longer than expected to connect to the server.")

if not success:
raise MapdlConnectionError("Unable to reconnect to MAPDL")
if not success:
raise MapdlConnectionError("Unable to reconnect to MAPDL")

# Update process
self._mapdl_process = process
Expand Down
3 changes: 2 additions & 1 deletion tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from subprocess import PIPE, STDOUT, Popen

import pytest
from requests.exceptions import HTTPError

from ansys.mapdl.core import EXAMPLES_PATH, examples
from ansys.mapdl.core.examples.downloads import (
Expand Down Expand Up @@ -112,7 +113,7 @@ def test_download_example_data_true_download():

def test_failed_download(running_test):
filename = "non_existing_file"
with pytest.raises(ValueError):
with pytest.raises(HTTPError):
with running_test(active=False): # To force downloading the file
_download_file(filename, directory=None)

Expand Down

0 comments on commit 2235a19

Please sign in to comment.