Skip to content

Commit

Permalink
tools/check-version-history: skip test if lxml is not installed
Browse files Browse the repository at this point in the history
```
================================= 1070/1408 ==================================
test:         systemd:dist / check-version-history
start time:   07:55:05
duration:     0.03s
result:       exit status 1
...
----------------------------------- stderr -----------------------------------
Traceback (most recent call last):
  File "/mnt/work/systemd/upstream-fork/main/tools/check-version-history.py", line 6, in <module>
    import lxml.etree as tree
ModuleNotFoundError: No module named 'lxml'
==============================================================================
```

Follow-up for 3691e7f
  • Loading branch information
aafeijoo-suse committed Apr 10, 2024
1 parent 866a469 commit 2ad44c2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tools/check-version-history.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@

import os
import sys
import lxml.etree as tree

try:
import lxml.etree as tree
except ImportError as e:
print(str(e), file=sys.stderr)
sys.exit(77)

_parser = tree.XMLParser(resolve_entities=False)
tree.set_default_parser(_parser)
Expand Down

0 comments on commit 2ad44c2

Please sign in to comment.