mirror of
https://github.com/curl/curl.git
synced 2026-06-15 04:25:42 +03:00
smbserver: check impacket presence differently
To silence ruff and GitHub CodeQL warnings. Closes #21929
This commit is contained in:
parent
056dcd9e71
commit
cb4b3e75e8
1 changed files with 2 additions and 3 deletions
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
import argparse
|
||||
import configparser
|
||||
import importlib.util
|
||||
import logging
|
||||
import os
|
||||
import signal
|
||||
|
|
@ -36,9 +37,7 @@ import threading
|
|||
from util import ClosingFileHandler, TestData
|
||||
|
||||
# impacket needs to be installed in the Python environment
|
||||
try:
|
||||
import impacket # noqa: F401
|
||||
except ImportError:
|
||||
if importlib.util.find_spec('impacket') is None:
|
||||
sys.stderr.write(
|
||||
'Warning: Python package impacket is required for smb testing; '
|
||||
'use pip or your package manager to install it\n')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue