From ba660418d51267d6c82dbb11d8e6698daf564ebc Mon Sep 17 00:00:00 2001 From: German <28149841+germa89@users.noreply.github.com> Date: Mon, 26 Aug 2024 13:19:46 +0200 Subject: [PATCH] feat/adding preppost license to allowed (#3294) * feat/adding preppost license to allowed * chore: adding changelog file 3294.miscellaneous.md * fix: test --------- Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> --- doc/changelog.d/3294.miscellaneous.md | 1 + src/ansys/mapdl/core/launcher.py | 5 ++++- src/ansys/mapdl/core/licensing.py | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 doc/changelog.d/3294.miscellaneous.md diff --git a/doc/changelog.d/3294.miscellaneous.md b/doc/changelog.d/3294.miscellaneous.md new file mode 100644 index 0000000000..2ace80a260 --- /dev/null +++ b/doc/changelog.d/3294.miscellaneous.md @@ -0,0 +1 @@ +feat/adding preppost license to allowed \ No newline at end of file diff --git a/src/ansys/mapdl/core/launcher.py b/src/ansys/mapdl/core/launcher.py index 3f3bdea4b4..ff15fbc138 100644 --- a/src/ansys/mapdl/core/launcher.py +++ b/src/ansys/mapdl/core/launcher.py @@ -1959,7 +1959,10 @@ def _check_license_argument(license_type, additional_switches): # In older versions probably it might raise an error. But not sure. license_type = license_type.lower().strip() - if "enterprise" in license_type and "solver" not in license_type: + if "preppost" in license_type: + license_type = "preppost" + + elif "enterprise" in license_type and "solver" not in license_type: license_type = "ansys" elif "enterprise" in license_type and "solver" in license_type: diff --git a/src/ansys/mapdl/core/licensing.py b/src/ansys/mapdl/core/licensing.py index b5ef1314bb..8740084ca9 100644 --- a/src/ansys/mapdl/core/licensing.py +++ b/src/ansys/mapdl/core/licensing.py @@ -51,6 +51,7 @@ "meba": "Ansys Mechanical Enterprise Solver", "mech_2": "Ansys Mechanical Premium", "mech_1": "Ansys Mechanical Pro", + "preppost": "Mechanical Enterprise PrepPost", } ALLOWABLE_LICENSES = list(LICENSES)