mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Move plugin manager to utils
Fix typo
This commit is contained in:
10
tljh/user.py
10
tljh/user.py
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user