don't import pkg_resources in the top of qubesadmin/utils.py

It's slow to import
This commit is contained in:
qubesuser 2017-11-09 17:25:12 +01:00
parent dbd2f0ee06
commit d08f1a58b7

View File

@ -25,8 +25,6 @@
'''Various utility functions.'''
import os
import pkg_resources
import qubesadmin.exc
@ -89,6 +87,7 @@ def get_entry_point_one(group, name):
'''Get a single entry point of given type,
raise TypeError when there are multiple.
'''
import pkg_resources
epoints = tuple(pkg_resources.iter_entry_points(group, name))
if not epoints:
raise KeyError(name)