Fix SyntaxWarning on Python 3.8
from __future__ import absolute_import
+import logging
import flask
from flask import request, signals
@@ -127,7 +128,7 @@ class ElasticAPM(object):
self.client = make_client(self.client_cls, app, **defaults)
# 0 is a valid log level (NOTSET), so we need to check explicitly for it
- if self.logging or self.logging is 0: # noqa F632
+ if self.logging or self.logging is logging.NOTSET:
if self.logging is not True:
kwargs = {"level": self.logging}
else:
