Disable debug log when creating peer type chat portal. Fixes #389

This commit is contained in:
Tulir Asokan
2019-12-01 20:10:45 +02:00
parent af0f731a8a
commit 69d56f4632
+5 -3
View File
@@ -401,9 +401,11 @@ class BasePortal(ABC):
if peer_type: if peer_type:
cls.log.info(f"Creating portal for {peer_type} {tgid} (receiver {tg_receiver})") cls.log.info(f"Creating portal for {peer_type} {tgid} (receiver {tg_receiver})")
if peer_type == "chat": # TODO enable this for non-release builds
import traceback # (or add better wrong peer type error handling)
cls.log.info("Chat portal stack trace:\n" + "".join(traceback.format_stack())) # if peer_type == "chat":
# import traceback
# cls.log.info("Chat portal stack trace:\n" + "".join(traceback.format_stack()))
portal = cls(tgid, peer_type=peer_type, tg_receiver=tg_receiver) portal = cls(tgid, peer_type=peer_type, tg_receiver=tg_receiver)
portal.db_instance.insert() portal.db_instance.insert()
return portal return portal