From 547b356a76c48232fad54b537211ed6d0aed71f4 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 24 Sep 2019 00:01:20 +0200 Subject: [PATCH] Remove deprecated handler.register --- wo/cli/bootstrap.py | 2 +- wo/cli/plugins/clean.py | 2 +- wo/cli/plugins/debug.py | 2 +- wo/cli/plugins/import_slow_log.py | 2 +- wo/cli/plugins/info.py | 2 +- wo/cli/plugins/log.py | 10 +++++----- wo/cli/plugins/maintenance.py | 2 +- wo/cli/plugins/secure.py | 2 +- wo/cli/plugins/site.py | 12 ++++++------ wo/cli/plugins/stack.py | 6 +++--- wo/cli/plugins/sync.py | 2 +- wo/cli/plugins/update.py | 2 +- 12 files changed, 23 insertions(+), 23 deletions(-) diff --git a/wo/cli/bootstrap.py b/wo/cli/bootstrap.py index 6df352d..60d5c4a 100644 --- a/wo/cli/bootstrap.py +++ b/wo/cli/bootstrap.py @@ -9,4 +9,4 @@ from wo.cli.controllers.base import WOBaseController def load(app): - handler.register(WOBaseController) + app.handler.register(WOBaseController) diff --git a/wo/cli/plugins/clean.py b/wo/cli/plugins/clean.py index a1b1231..3c00862 100644 --- a/wo/cli/plugins/clean.py +++ b/wo/cli/plugins/clean.py @@ -90,6 +90,6 @@ class WOCleanController(CementBaseController): def load(app): # register the plugin class.. this only happens if the plugin is enabled - handler.register(WOCleanController) + app.handler.register(WOCleanController) # register a hook (function) to run after arguments are parsed. hook.register('post_argument_parsing', wo_clean_hook) diff --git a/wo/cli/plugins/debug.py b/wo/cli/plugins/debug.py index 8cc2482..9d0b5f4 100644 --- a/wo/cli/plugins/debug.py +++ b/wo/cli/plugins/debug.py @@ -847,6 +847,6 @@ class WODebugController(CementBaseController): def load(app): # register the plugin class.. this only happens if the plugin is enabled - handler.register(WODebugController) + app.handler.register(WODebugController) # register a hook (function) to run after arguments are parsed. hook.register('post_argument_parsing', wo_debug_hook) diff --git a/wo/cli/plugins/import_slow_log.py b/wo/cli/plugins/import_slow_log.py index bc13ff8..63a1896 100644 --- a/wo/cli/plugins/import_slow_log.py +++ b/wo/cli/plugins/import_slow_log.py @@ -26,7 +26,7 @@ class WOImportslowlogController(CementBaseController): def load(app): # register the plugin class.. this only happens if the plugin is enabled - handler.register(WOImportslowlogController) + app.handler.register(WOImportslowlogController) # register a hook (function) to run after arguments are parsed. hook.register('post_argument_parsing', wo_import_slow_log_hook) diff --git a/wo/cli/plugins/info.py b/wo/cli/plugins/info.py index 0a6a145..764a1e2 100644 --- a/wo/cli/plugins/info.py +++ b/wo/cli/plugins/info.py @@ -292,7 +292,7 @@ class WOInfoController(CementBaseController): def load(app): # register the plugin class.. this only happens if the plugin is enabled - handler.register(WOInfoController) + app.handler.register(WOInfoController) # register a hook (function) to run after arguments are parsed. hook.register('post_argument_parsing', wo_info_hook) diff --git a/wo/cli/plugins/log.py b/wo/cli/plugins/log.py index d2d2fe3..8035eb7 100644 --- a/wo/cli/plugins/log.py +++ b/wo/cli/plugins/log.py @@ -571,10 +571,10 @@ class WOLogMailController(CementBaseController): def load(app): # register the plugin class.. this only happens if the plugin is enabled - handler.register(WOLogController) - handler.register(WOLogShowController) - handler.register(WOLogResetController) - handler.register(WOLogGzipController) - handler.register(WOLogMailController) + app.handler.register(WOLogController) + app.handler.register(WOLogShowController) + app.handler.register(WOLogResetController) + app.handler.register(WOLogGzipController) + app.handler.register(WOLogMailController) # register a hook (function) to run after arguments are parsed. hook.register('post_argument_parsing', wo_log_hook) diff --git a/wo/cli/plugins/maintenance.py b/wo/cli/plugins/maintenance.py index 8d45967..1a62fe0 100644 --- a/wo/cli/plugins/maintenance.py +++ b/wo/cli/plugins/maintenance.py @@ -40,6 +40,6 @@ class WOMaintenanceController(CementBaseController): def load(app): # register the plugin class.. this only happens if the plugin is enabled - handler.register(WOMaintenanceController) + app.handler.register(WOMaintenanceController) # register a hook (function) to run after arguments are parsed. hook.register('post_argument_parsing', wo_maintenance_hook) diff --git a/wo/cli/plugins/secure.py b/wo/cli/plugins/secure.py index e86dd9f..6f41ed1 100644 --- a/wo/cli/plugins/secure.py +++ b/wo/cli/plugins/secure.py @@ -220,5 +220,5 @@ class WOSecureController(CementBaseController): def load(app): - handler.register(WOSecureController) + app.handler.register(WOSecureController) hook.register('post_argument_parsing', wo_secure_hook) diff --git a/wo/cli/plugins/site.py b/wo/cli/plugins/site.py index d48fdd9..912207a 100644 --- a/wo/cli/plugins/site.py +++ b/wo/cli/plugins/site.py @@ -2049,11 +2049,11 @@ class WOSiteListController(CementBaseController): def load(app): # register the plugin class.. this only happens if the plugin is enabled - handler.register(WOSiteController) - handler.register(WOSiteCreateController) - handler.register(WOSiteUpdateController) - handler.register(WOSiteDeleteController) - handler.register(WOSiteListController) - handler.register(WOSiteEditController) + app.handler.register(WOSiteController) + app.handler.register(WOSiteCreateController) + app.handler.register(WOSiteUpdateController) + app.handler.register(WOSiteDeleteController) + app.handler.register(WOSiteListController) + app.handler.register(WOSiteEditController) # register a hook (function) to run after arguments are parsed. hook.register('post_argument_parsing', wo_site_hook) diff --git a/wo/cli/plugins/stack.py b/wo/cli/plugins/stack.py index 1f1acc2..dff3623 100644 --- a/wo/cli/plugins/stack.py +++ b/wo/cli/plugins/stack.py @@ -998,9 +998,9 @@ class WOStackController(CementBaseController): def load(app): # register the plugin class.. this only happens if the plugin is enabled app.handler.register(WOStackController) - handler.register(WOStackStatusController) - handler.register(WOStackMigrateController) - handler.register(WOStackUpgradeController) + app.handler.register(WOStackStatusController) + app.handler.register(WOStackMigrateController) + app.handler.register(WOStackUpgradeController) # register a hook (function) to run after arguments are parsed. hook.register('post_argument_parsing', wo_stack_hook) diff --git a/wo/cli/plugins/sync.py b/wo/cli/plugins/sync.py index 732d9ee..287a05d 100644 --- a/wo/cli/plugins/sync.py +++ b/wo/cli/plugins/sync.py @@ -94,6 +94,6 @@ class WOSyncController(CementBaseController): def load(app): # register the plugin class.. this only happens if the plugin is enabled - handler.register(WOSyncController) + app.handler.register(WOSyncController) # register a hook (function) to run after arguments are parsed. hook.register('post_argument_parsing', wo_sync_hook) diff --git a/wo/cli/plugins/update.py b/wo/cli/plugins/update.py index 0372853..119f499 100644 --- a/wo/cli/plugins/update.py +++ b/wo/cli/plugins/update.py @@ -78,6 +78,6 @@ class WOUpdateController(CementBaseController): def load(app): # register the plugin class.. this only happens if the plugin is enabled - handler.register(WOUpdateController) + app.handler.register(WOUpdateController) # register a hook (function) to run after arguments are parsed. hook.register('post_argument_parsing', wo_update_hook)