From 59ffad0090ba8d29eb619b4d08ac43d754b1873e Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Sun, 18 Dec 2022 12:42:14 +0100 Subject: [PATCH] Promote messagebox warnings to errors No point in making a warning if it immediately is raised. --- telethon/_updates/messagebox.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telethon/_updates/messagebox.py b/telethon/_updates/messagebox.py index 2014f63d..f1885c2e 100644 --- a/telethon/_updates/messagebox.py +++ b/telethon/_updates/messagebox.py @@ -631,7 +631,7 @@ class MessageBox: secret = ENTRY_SECRET in self.getting_diff_for if not account and not secret: - raise RuntimeWarning('Should not be applying the difference when neither account or secret was diff was active') + raise RuntimeError('Should not be applying the difference when neither account or secret was diff was active') # Both may be active if both expired at the same time. if account: @@ -677,7 +677,7 @@ class MessageBox: secret = ENTRY_SECRET in self.getting_diff_for if not account and not secret: - raise RuntimeWarning('Should not be ending get difference when neither account or secret was diff was active') + raise RuntimeError('Should not be ending get difference when neither account or secret was diff was active') # Both may be active if both expired at the same time. if account: