Skip to content

Commit 2957994

Browse files
Remove deprecated server validation use (#648)
* Remove deprecated server validation use * Update Mergin/utils.py Co-authored-by: Valentin Buira <30632058+ValentinBuira@users.noreply.github.com> * Update utils.py --------- Co-authored-by: Valentin Buira <30632058+ValentinBuira@users.noreply.github.com>
1 parent d75fa88 commit 2957994

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Mergin/utils.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -399,14 +399,13 @@ def send_logs(username, logfile):
399399

400400
def validate_mergin_url(url):
401401
"""
402-
Validation of mergin URL by pinging. Checks if URL points at compatible Mergin server.
402+
Initiates connection to the provided server URL to check if the server is accessible
403403
:param url: String Mergin Maps URL to ping.
404404
:return: String error message as result of validation. If None, URL is valid.
405405
"""
406406
try:
407-
mc = MerginClient(url, proxy_config=get_qgis_proxy_config(url))
408-
if not mc.is_server_compatible():
409-
return "Incompatible Mergin Maps server"
407+
MerginClient(url, proxy_config=get_qgis_proxy_config(url))
408+
410409
# Valid but not Mergin URl
411410
except ClientError:
412411
return "Invalid Mergin Maps URL"
@@ -1223,7 +1222,7 @@ def test_server_connection(url, username, password):
12231222
result = True, "<font color=green> OK </font>"
12241223
proxy_config = get_qgis_proxy_config(url)
12251224
try:
1226-
mc = MerginClient(url, None, username, password, get_plugin_version(), proxy_config)
1225+
MerginClient(url, None, username, password, get_plugin_version(), proxy_config)
12271226
except (LoginError, ClientError) as e:
12281227
QgsApplication.messageLog().logMessage(f"Mergin Maps plugin: {str(e)}")
12291228
result = False, f"<font color=red> Connection failed, {str(e)} </font>"

0 commit comments

Comments
 (0)