refactor: use explicit conversion in f-strings

This commit is contained in:
Mark Paronyan committed 2026-10-01 19:57:41 +03:00
1 parent 0f66fd6c2b
commit c5b5091f5e
32 files changed
+65 -65

No files matched your search

@@ -325,7 +325,7 @@ class PacketAnalysisTool(BaseTool):
except Exception as e:
logger.error(f"PacketAnalysisTool error: {e}", exc_info=True)
return f'{{"error": "Analysis failed: {str(e)}"}}'
return f'{{"error": "Analysis failed: {e!s}"}}'
finally:
# Clean up temp file
@@ -497,7 +497,7 @@ class PacketAnalysisTool(BaseTool):
return '{"error": "tshark not installed. Please install tshark: apt install tshark"}'
except Exception as e:
logger.error(f"tshark execution error: {e}", exc_info=True)
return f'{{"error": "tshark failed: {str(e)}"}}'
return f'{{"error": "tshark failed: {e!s}"}}'
if __name__ == "__main__":