🎉 Fix: Updated log files for better error tracking and debugging 🛠️
This commit is contained in:
@ -457,15 +457,16 @@ class DruckerSteuerung:
|
||||
|
||||
# Test 3: ICMP Ping (falls verfügbar)
|
||||
try:
|
||||
import subprocess
|
||||
from utils.core_system import safe_subprocess_run
|
||||
# Windows und Linux kompatibel
|
||||
param = '-n' if os.name == 'nt' else '-c'
|
||||
command = ['ping', param, '1', '-w', '2000', ip]
|
||||
result = subprocess.run(command, capture_output=True, text=True, timeout=3)
|
||||
if result.returncode == 0:
|
||||
result = safe_subprocess_run(command, capture_output=True, timeout=3)
|
||||
if result and result.returncode == 0:
|
||||
hardware_logger.debug(f"✅ {ip} via ICMP Ping erreichbar")
|
||||
return True
|
||||
except:
|
||||
except Exception as e:
|
||||
hardware_logger.debug(f"ICMP Ping Test fehlgeschlagen: {e}")
|
||||
pass
|
||||
|
||||
hardware_logger.warning(f"⚠️ {ip} ist über keine Methode erreichbar")
|
||||
|
Reference in New Issue
Block a user