Browse Source

queue availability check

Roman Hergenreder 3 years ago
parent
commit
5046360a1d
2 changed files with 2 additions and 2 deletions
  1. 1 1
      pingscan.py
  2. 1 1
      portscan.py

+ 1 - 1
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

+ 1 - 1
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