📚 Improved Mercedes Certificate Installation Documentation and Scripts 🎉
This commit is contained in:
@@ -213,7 +213,7 @@ def apply_all_windows_fixes():
|
||||
return
|
||||
|
||||
try:
|
||||
logger.info("🔧 Wende Windows-spezifische Fixes an...")
|
||||
windows_logger.info("🔧 Wende Windows-spezifische Fixes an...")
|
||||
|
||||
# 1. Encoding-Fixes
|
||||
apply_encoding_fixes()
|
||||
@@ -231,10 +231,10 @@ def apply_all_windows_fixes():
|
||||
apply_global_subprocess_patch()
|
||||
|
||||
_windows_fixes_applied = True
|
||||
logger.info("✅ Alle Windows-Fixes erfolgreich angewendet")
|
||||
windows_logger.info("✅ Alle Windows-Fixes erfolgreich angewendet")
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"❌ Fehler beim Anwenden der Windows-Fixes: {str(e)}")
|
||||
windows_logger.error(f"❌ Fehler beim Anwenden der Windows-Fixes: {str(e)}")
|
||||
raise e
|
||||
|
||||
# Automatisch Windows-Fixes beim Import anwenden (nur einmal)
|
||||
@@ -245,9 +245,9 @@ if os.name == 'nt' and not _windows_fixes_applied:
|
||||
if not hasattr(subprocess, '_early_patched'):
|
||||
patch_subprocess()
|
||||
subprocess._early_patched = True
|
||||
logger.info("✅ Früher subprocess-Patch beim Import angewendet")
|
||||
windows_logger.info("✅ Früher subprocess-Patch beim Import angewendet")
|
||||
except Exception as e:
|
||||
logger.warning(f"⚠️ Früher subprocess-Patch fehlgeschlagen: {str(e)}")
|
||||
windows_logger.warning(f"⚠️ Früher subprocess-Patch fehlgeschlagen: {str(e)}")
|
||||
|
||||
apply_all_windows_fixes()
|
||||
|
||||
@@ -350,4 +350,46 @@ def apply_global_subprocess_patch():
|
||||
# Sichere subprocess-Funktion exportieren
|
||||
__all__.append('safe_subprocess_run')
|
||||
__all__.append('patch_subprocess')
|
||||
__all__.append('apply_global_subprocess_patch')
|
||||
__all__.append('apply_global_subprocess_patch')
|
||||
|
||||
# ===== ENCODING-FIXES =====
|
||||
|
||||
def apply_encoding_fixes():
|
||||
"""Wendet Windows-spezifische Encoding-Fixes an."""
|
||||
try:
|
||||
# Umgebungsvariablen für bessere Windows-Kompatibilität
|
||||
os.environ['PYTHONIOENCODING'] = 'utf-8'
|
||||
os.environ['PYTHONUTF8'] = '1'
|
||||
|
||||
windows_logger.debug("✅ Windows-Encoding-Fixes angewendet")
|
||||
|
||||
except Exception as e:
|
||||
windows_logger.warning(f"⚠️ Encoding-Fixes konnten nicht angewendet werden: {str(e)}")
|
||||
|
||||
# ===== THREADING-FIXES =====
|
||||
|
||||
def apply_threading_fixes():
|
||||
"""Wendet Windows-spezifische Threading-Fixes an."""
|
||||
try:
|
||||
# Thread-Manager initialisieren
|
||||
get_windows_thread_manager()
|
||||
|
||||
# Socket-Fixes anwenden
|
||||
fix_windows_socket_issues()
|
||||
apply_safe_socket_options()
|
||||
|
||||
windows_logger.debug("✅ Windows-Threading-Fixes angewendet")
|
||||
|
||||
except Exception as e:
|
||||
windows_logger.warning(f"⚠️ Threading-Fixes konnten nicht angewendet werden: {str(e)}")
|
||||
|
||||
# ===== SIGNAL-FIXES =====
|
||||
|
||||
def apply_signal_fixes():
|
||||
"""Wendet Windows-spezifische Signal-Handler-Fixes an."""
|
||||
try:
|
||||
# Signal-Handler werden bereits im WindowsThreadManager registriert
|
||||
windows_logger.debug("✅ Windows-Signal-Fixes angewendet")
|
||||
|
||||
except Exception as e:
|
||||
windows_logger.warning(f"⚠️ Signal-Fixes konnten nicht angewendet werden: {str(e)}")
|
Reference in New Issue
Block a user