🎉 Fix: Updated log files for better error tracking and debugging 🛠️

This commit is contained in:
Till Tomczak
2025-06-20 09:08:01 +02:00
parent 98f7878351
commit 0360d8c386
22 changed files with 670 additions and 4 deletions

View File

@ -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")