push notifications: Fix unnecessary warning in development.

This prevents the warning about push notifications not being
registered for from being printed in development environment startup
by default.  In development, that's the expected state, and we don't
need to spam up the output with that notice.
This commit is contained in:
Tim Abbott 2018-12-03 12:03:56 -08:00
parent e13de3e629
commit 4c1e80032a
1 changed files with 3 additions and 0 deletions

View File

@ -433,6 +433,9 @@ def push_notifications_enabled() -> bool:
def initialize_push_notifications() -> None:
if not push_notifications_enabled():
if settings.DEVELOPMENT and not settings.TEST_SUITE: # nocoverage
# Avoid unnecessary spam on development environment startup
return
logger.warning("Mobile push notifications are not configured.\n "
"See https://zulip.readthedocs.io/en/latest/"
"production/mobile-push-notifications.html")