Imports cleanup
authorThierry Florac <tflorac@ulthar.net>
Mon, 25 Nov 2019 13:59:41 +0100
changeset 21 75bafb4ce0b0
parent 20 21dbcce467f3
child 22 1d62c9b1fa34
Imports cleanup
src/pyams_apm/tween.py
--- a/src/pyams_apm/tween.py	Mon Nov 25 13:55:12 2019 +0100
+++ b/src/pyams_apm/tween.py	Mon Nov 25 13:59:41 2019 +0100
@@ -17,11 +17,10 @@
 """
 
 import sys
+import pkg_resources
 
 import elasticapm
-import pkg_resources
 from elasticapm.utils import compat, get_url_dict
-from pkg_resources import DistributionNotFound
 from pyramid.compat import reraise
 from pyramid.settings import asbool
 
@@ -75,7 +74,7 @@
         if service_version:
             try:
                 service_version = pkg_resources.get_distribution(service_version).version
-            except DistributionNotFound:
+            except pkg_resources.DistributionNotFound:
                 pass
         self.client = elasticapm.Client(
             server_url=config.get("elasticapm.server_url"),