diff --git a/pingscan.py b/pingscan.py index 7d4c486..1acec30 100644 --- a/pingscan.py +++ b/pingscan.py @@ -9,7 +9,7 @@ from importlib import util threading_spec = util.find_spec("threading") queue_spec = util.find_spec("queue") -if threading_spec is not None: +if threading_spec is not None and queue_spec is not None: import threading import queue NUM_THREADS = 10 diff --git a/portscan.py b/portscan.py index 5d1ae51..a6e850c 100644 --- a/portscan.py +++ b/portscan.py @@ -8,7 +8,7 @@ from importlib import util threading_spec = util.find_spec("threading") queue_spec = util.find_spec("queue") -if threading_spec is not None: +if threading_spec is not None and queue_spec is not None: import threading import queue NUM_THREADS = 10