From 5957c0c94aebc2b90566837c67a5eb6ef50ebf5d Mon Sep 17 00:00:00 2001 From: Von Random Date: Fri, 7 Feb 2025 23:10:30 +0200 Subject: [PATCH] fix stderr output --- pgbotlib/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pgbotlib/api.py b/pgbotlib/api.py index dc734ee..844b14a 100644 --- a/pgbotlib/api.py +++ b/pgbotlib/api.py @@ -40,7 +40,8 @@ class ApiWrapper: case 'y_search': return self.y_search(message) case _: return self.FAILED except Exception as e: - sys.stderr.write(str(e)) + e_text = str(e) + sys.stderr.write(f'API failed: {e_text}\n') return self.FAILED def __sanitize_search(self, message: str) -> str: