refactor: Simplify exception handling in platform info retrieval

This commit is contained in:
Paul Gauthier 2025-03-21 11:24:10 -07:00 committed by Paul Gauthier (aider)
parent f9e0a99064
commit f3a042dcdf

View file

@ -1033,7 +1033,7 @@ class Coder:
platform_text = ""
try:
platform_text = f"- Platform: {platform.platform()}\n"
except (Exception, KeyError):
except KeyError:
# Skip platform info if it can't be retrieved
platform_text = "- Platform information unavailable\n"