Setup logs later then initializing tdlib to see errors

This commit is contained in:
Paul Nameless 2020-06-20 15:22:21 +08:00
parent 4d3fe2b952
commit e4b46a0430

View file

@ -44,7 +44,6 @@ def run(tg: Tdlib, stdscr: window) -> None:
def main():
utils.setup_log()
tg = Tdlib(
api_id=config.API_ID,
api_hash=config.API_HASH,
@ -55,6 +54,8 @@ def main():
library_path=config.TDLIB_PATH,
)
tg.login()
utils.setup_log()
utils.set_shorter_esc_delay()
wrapper(partial(run, tg))