Added TODO: keep Sentry unconfigured when running CLI commands.

When running CLI stuff the logging is seen by human eyes anyway, so we
don't need to send things to Sentry.
This commit is contained in:
Sybren A. Stüvel 2018-03-27 11:50:09 +02:00
parent 318ccb2d95
commit de8bff51b5

View File

@ -223,6 +223,7 @@ class PillarServer(BlinkerCompatibleEve):
self.log.info('Git revision %r', self.config['GIT_REVISION'])
def _config_sentry(self):
# TODO(Sybren): keep Sentry unconfigured when running CLI commands.
sentry_dsn = self.config.get('SENTRY_CONFIG', {}).get('dsn')
if self.config.get('TESTING') or sentry_dsn in {'', '-set-in-config-local-'}:
self.log.warning('Sentry NOT configured.')