Skip to content

Commit 0f977c5

Browse files
author
Prabhakar Kumar
committed
Update validator to pass empty string in MLM_LICENSE_FILE without erroring to MATLAB.
1 parent 385b9b2 commit 0f977c5

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

matlab_proxy/util/mwi/validators.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ def validate_mlm_license_file(nlm_connections_str):
5757

5858
from .exceptions import NetworkLicensingError
5959

60-
if nlm_connections_str is None:
60+
if not nlm_connections_str:
61+
# Handles empty strings and None values
6162
return None
6263

6364
# Regular expression to match port@hostname,

tests/util/mwi/test_validators.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,12 @@
2222
("1234"),
2323
("hostname"),
2424
("1234hostname"),
25-
(""),
2625
],
2726
ids=[
2827
"Invalid path to a license file",
2928
"NLM string with just port number",
3029
"NLM string with just hostname",
3130
"NLM string with just port number and hostname",
32-
"empty value",
3331
],
3432
)
3533
def test_validate_mlm_license_file_invalid_value(MLM_LICENSE_FILE, monkeypatch):

0 commit comments

Comments
 (0)