From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM autolearn=no autolearn_force=no version=3.4.6 Received: from localhost.localdomain (unknown [101.128.126.135]) by gnuweeb.org (Postfix) with ESMTPSA id C68D87E580; Sun, 8 Jan 2023 06:16:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1673158563; bh=JbtHb/qI/7+j77/w85X4ZvXkE4ESKB82PDGVJDI5QIE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OxHen6PpmMGgF6VQUa2CGkWMe0u2FX6BG1rmo20DNHjmb6mDOfzyBX5K4rrmXqu4j RwST+iu0hDH+DFK+FE5LDlRYTW6r0d1snq4CU1z3loSOOOtbBaGx4c3b1rGka24n7u VLfjt0/K0TL+a3vR3h3BJ03l17ZGYMNCB3hhzoeYMqgW39z7fVS7uHtI9YxOec5h0y 7hNoXKunZmoynhTt7K2cfJeq6IjeEbtjZd/PHWXgXw8EmLjCEWcJxRNWRdbFwPGuq+ 8+qERFPhuW6vKs6u+ZS0dymJsEozNr+Y1nbl3XanA62C8joqJYrN00YybRJT8bTqJC rc32LD6ZNFvug== From: Muhammad Rizki To: Ammar Faizi Cc: Muhammad Rizki , Alviro Iskandar Setiawan , GNU/Weeb Mailing List Subject: [PATCH v2 01/11] discord: Remove unnecessary try/except block Date: Sun, 8 Jan 2023 13:15:33 +0700 Message-Id: <20230108061543.1780-2-kiizuha@gnuweeb.org> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20230108061543.1780-1-kiizuha@gnuweeb.org> References: <20230108061543.1780-1-kiizuha@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We don't need this anymore since it's already has a try/except earlier. Signed-off-by: Muhammad Rizki --- daemon/dscord/mailer/listener.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/daemon/dscord/mailer/listener.py b/daemon/dscord/mailer/listener.py index 24f0a6c..a225f46 100644 --- a/daemon/dscord/mailer/listener.py +++ b/daemon/dscord/mailer/listener.py @@ -106,14 +106,7 @@ class Listener: self.logger.debug(md) return False - try: - text, files, is_patch = utils.create_template(mail, Platform.DISCORD) - except: - exc_str = utils.catch_err() - self.client.logger.warning(exc_str) - await self.client.send_log_file(url) - return - + text, files, is_patch = utils.create_template(mail, Platform.DISCORD) reply_to = self.get_discord_reply(mail, dc_chat_id) url = str(re.sub(r"/raw$", "", url)) -- Muhammad Rizki