1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-27 13:34:28 +00:00

remove useless code

This commit is contained in:
Steffo 2019-02-28 21:25:24 +01:00
parent 72d8c343b4
commit 77eb98a344

View file

@ -12,7 +12,6 @@ import sys
import coloredlogs import coloredlogs
import requests import requests
from utils import Dirty, DirtyDelta from utils import Dirty, DirtyDelta
from sentry_sdk import configure_scope
logging.getLogger().disabled = True logging.getLogger().disabled = True
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -39,12 +38,6 @@ def update_block(session: db.Session, block: list, delay: float = 0, change_call
try: try:
change = item.update(session=session) change = item.update(session=session)
except requests.exceptions.HTTPError as e: except requests.exceptions.HTTPError as e:
with configure_scope() as scope:
if str(e.response.status_code).startswith("5"):
scope.level = "warning"
logger.warning(f"Server error {sys.exc_info()} while updating {repr(item)}.")
else:
scope.level = "error"
logger.error(f"Error {sys.exc_info()} while updating {repr(item)}.") logger.error(f"Error {sys.exc_info()} while updating {repr(item)}.")
sentry.extra_context({ sentry.extra_context({
"item": repr(item), "item": repr(item),