Skip to content

Commit 1e06654

Browse files
committed
Check software attribute.
1 parent 8c45dd5 commit 1e06654

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

‎language_tool/__init__.py‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -388,13 +388,11 @@ def _start_server(cls):
388388
raise err
389389
raise ServerError("{}: {}".format(cls._url, e))
390390
root = tree.getroot()
391-
if root.tag != "matches":
392-
raise ServerError("unexpected root from {}: {!r}"
393-
.format(cls._url, root.tag))
391+
394392
# LanguageTool 1.9+
395-
#if root.get("software") != "LanguageTool":
396-
#raise ServerError("unexpected software from {}: {!r}"
397-
#.format(cls._url, root.get("software")))
393+
if root.get("software") != "LanguageTool":
394+
raise ServerError("unexpected software from {}: {!r}"
395+
.format(cls._url, root.get("software")))
398396

399397
@classmethod
400398
def _server_is_alive(cls):

0 commit comments

Comments
 (0)