Skip to content

Commit

Permalink
Remove Surplus Logging from Updater Network Loop (python-telegram-b…
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinHjelmare authored Aug 19, 2024
1 parent fbf07bf commit a05362c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion telegram/ext/_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,6 @@ async def do_action() -> bool:
_LOGGER.exception("Invalid token; aborting")
raise
except TelegramError as telegram_exc:
_LOGGER.exception("Error while %s:", description)
on_err_cb(telegram_exc)

# increase waiting times on subsequent errors up to 30secs
Expand Down
4 changes: 2 additions & 2 deletions tests/ext/test_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ async def get_updates(*args, **kwargs):
else:
assert len(caplog.records) > 0
assert any(
"Error while getting Updates:" in record.getMessage()
"Exception happened while polling for updates." in record.getMessage()
and record.name == "telegram.ext.Updater"
for record in caplog.records
)
Expand All @@ -593,7 +593,7 @@ async def get_updates(*args, **kwargs):
else:
assert len(caplog.records) > 0
assert any(
"Error while getting Updates:" in record.getMessage()
"Exception happened while polling for updates." in record.getMessage()
and record.name == "telegram.ext.Updater"
for record in caplog.records
)
Expand Down

0 comments on commit a05362c

Please sign in to comment.