From f4970447775da9038b719fd59b72765e14a0a500 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 25 Mar 2017 14:08:23 -0700 Subject: [PATCH] corecommands: use utils.PLUGIN_PREFIX in 'unload' --- coremods/corecommands.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/coremods/corecommands.py b/coremods/corecommands.py index 36dbf07..bead746 100644 --- a/coremods/corecommands.py +++ b/coremods/corecommands.py @@ -2,9 +2,6 @@ corecommands.py - Implements core PyLink commands. """ -# Get the package name that plugins are stored under. -plugin_root = __name__.split('.')[0] + '.plugins.' - import gc import sys import importlib @@ -119,7 +116,7 @@ def unload(irc, source, args): # Since we're using absolute imports in 0.9.x+, the module name differs from the actual plugin # name. - modulename = plugin_root + name + modulename = utils.PLUGIN_PREFIX + name if name in world.plugins: log.info('(%s) Unloading plugin %r for %s', irc.name, name, irc.getHostmask(source))