don't import pkg_resources in the top of qubesadmin/utils.py
It's slow to import
This commit is contained in:
parent
dbd2f0ee06
commit
d08f1a58b7
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user