Skip to content

Commit

Permalink
Tools: fix flake8 issue
Browse files Browse the repository at this point in the history
  • Loading branch information
khancyr committed Oct 20, 2023
1 parent d23acef commit b9a2029
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Tools/autotest/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import traceback
from datetime import datetime
from typing import List
import importlib.util

import pexpect
import fnmatch
Expand Down Expand Up @@ -1549,7 +1550,9 @@ def __init__(self,
self.generate_junit = generate_junit
if generate_junit:
try:
import junitparser
spec = importlib.util.find_spec("junitparser")
if spec is None:
raise ImportError
except ImportError as e:
raise ImportError(f"Junit export need junitparser package.\n {e} \nTry: python -m pip install junitparser")

Expand Down

0 comments on commit b9a2029

Please sign in to comment.