Move plugin manager to utils

Fix typo
This commit is contained in:
johannes.kaufmann
2019-10-28 08:48:52 +01:00
parent e87a3846d8
commit 6c00595073
3 changed files with 26 additions and 18 deletions

View File

@@ -8,14 +8,8 @@ import pwd
import subprocess
from os.path import expanduser
import pluggy
from tljh import hooks
# Set up plugin infrastructure
pm = pluggy.PluginManager('tljh')
pm.add_hookspecs(hooks)
pm.load_setuptools_entrypoints('tljh')
from tljh.utils import get_plugin_manager
def ensure_user(username):
@@ -31,6 +25,8 @@ def ensure_user(username):
# User doesn't exist, time to create!
pass
pm = get_plugin_manager()
subprocess.check_call([
'useradd',
'--create-home',