From 0b7892d10a9f193bab73aef129dfee4843c7a78b Mon Sep 17 00:00:00 2001 From: Omicron166 <64985125+Omicron166@users.noreply.github.com> Date: Sun, 6 Mar 2022 10:58:22 +0100 Subject: [PATCH] not lns server detection improved --- clients/python/lns.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clients/python/lns.py b/clients/python/lns.py index 1d95bf3..885dbce 100644 --- a/clients/python/lns.py +++ b/clients/python/lns.py @@ -18,7 +18,8 @@ def __init__(self, server: str): self.server = 'http://' + url.netloc else: self.server = url.scheme + '://' + url.netloc - status = requests.get(self.server + '/index.json').json() + try: status = requests.get(self.server + '/index.json').json() + except: raise IncompatibleServer if not status['version'] in server_version: raise IncompatibleServer()