Skip to content

Commit

Permalink
fix: Address some lint
Browse files Browse the repository at this point in the history
  • Loading branch information
timmc-edx committed Oct 23, 2023
1 parent 07b0e59 commit 9f63f71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions edx_arch_experiments/config_watcher/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from django.apps import AppConfig


class ConfigWatcherApp(AppConfig):
"""
Django application to report configuration changes to operators.
Expand Down
5 changes: 3 additions & 2 deletions edx_arch_experiments/config_watcher/signals/receivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def _send_to_slack(message):
if status != 200:
log.error(f"Slack rejected the config watcher message. {status=}, body={resp.read().decode('utf-8')}")


def _report_config_change(message):
log.info(message)
_send_to_slack(message)
Expand Down Expand Up @@ -89,15 +90,15 @@ def _register_waffle_observation(*, model, short_name, fields):
def report_waffle_change(*args, instance, created, **kwargs):
try:
_report_waffle_change(short_name, instance, created, fields)
except:
except: # pylint: disable=bare-except
# Log and suppress error so Waffle change can proceed
log.exception(f"Failed to report change to waffle {short_name}")

@receiver(signals.post_delete, sender=model)
def report_waffle_delete(*args, instance, **kwargs):
try:
_report_waffle_delete(short_name, instance)
except:
except: # pylint: disable=bare-except
log.exception(f"Failed to report deletion of waffle {short_name}")


Expand Down

0 comments on commit 9f63f71

Please sign in to comment.