diff --git a/rhodecode/apps/admin/views/permissions.py b/rhodecode/apps/admin/views/permissions.py --- a/rhodecode/apps/admin/views/permissions.py +++ b/rhodecode/apps/admin/views/permissions.py @@ -28,7 +28,7 @@ from pyramid.renderers import render from pyramid.response import Response from rhodecode.apps._base import BaseAppView, DataGridAppView -from rhodecode.apps.ssh_support import SshKeyFileChangeEvent +from rhodecode.apps.ssh_support.events import SshKeyFileChangeEvent from rhodecode import events from rhodecode.lib import helpers as h diff --git a/rhodecode/apps/admin/views/users.py b/rhodecode/apps/admin/views/users.py --- a/rhodecode/apps/admin/views/users.py +++ b/rhodecode/apps/admin/views/users.py @@ -27,7 +27,7 @@ from pyramid.response import Response from rhodecode import events from rhodecode.apps._base import BaseAppView, DataGridAppView, UserAppView -from rhodecode.apps.ssh_support import SshKeyFileChangeEvent +from rhodecode.apps.ssh_support.events import SshKeyFileChangeEvent from rhodecode.authentication.base import get_authn_registry, RhodeCodeExternalAuthPlugin from rhodecode.authentication.plugins import auth_rhodecode from rhodecode.events import trigger diff --git a/rhodecode/apps/my_account/views/my_account_ssh_keys.py b/rhodecode/apps/my_account/views/my_account_ssh_keys.py --- a/rhodecode/apps/my_account/views/my_account_ssh_keys.py +++ b/rhodecode/apps/my_account/views/my_account_ssh_keys.py @@ -21,7 +21,7 @@ import logging from pyramid.httpexceptions import HTTPFound from rhodecode.apps._base import BaseAppView, DataGridAppView -from rhodecode.apps.ssh_support import SshKeyFileChangeEvent +from rhodecode.apps.ssh_support.events import SshKeyFileChangeEvent from rhodecode.events import trigger from rhodecode.lib import helpers as h from rhodecode.lib import audit_logger diff --git a/rhodecode/apps/ssh_support/__init__.py b/rhodecode/apps/ssh_support/__init__.py --- a/rhodecode/apps/ssh_support/__init__.py +++ b/rhodecode/apps/ssh_support/__init__.py @@ -19,8 +19,6 @@ import logging from . import config_keys -from .events import SshKeyFileChangeEvent -from .subscribers import generate_ssh_authorized_keys_file_subscriber from rhodecode.config.settings_maker import SettingsMaker @@ -55,5 +53,7 @@ def includeme(config): # if we have enable generation of file, subscribe to event if settings[config_keys.generate_authorized_keyfile]: + # lazy import here for faster code reading... via sshwrapper-v2 mode + from .subscribers import generate_ssh_authorized_keys_file_subscriber config.add_subscriber( generate_ssh_authorized_keys_file_subscriber, SshKeyFileChangeEvent)