From 1f9a28e3b05f5f287317f3ac3f25ff40883e412d Mon Sep 17 00:00:00 2001 From: zk-ncc Date: Wed, 4 Jan 2017 15:03:12 -0600 Subject: [PATCH] fix plugin.plugin_by_name() --- pappyproxy/plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pappyproxy/plugin.py b/pappyproxy/plugin.py index 5b5a98e..b09e7f7 100644 --- a/pappyproxy/plugin.py +++ b/pappyproxy/plugin.py @@ -74,8 +74,8 @@ def plugin_by_name(name): plugin you would call ``plugin_by_name('bar').foo()``. """ import pappyproxy.pappy - if name in pappyproxy.pappy.plugin_loader.plugins_by_name: - return pappyproxy.pappy.plugin_loader.plugins_by_name[name].source + if name in pappyproxy.pappy.session.plugin_loader.plugins_by_name: + return pappyproxy.pappy.session.plugin_loader.plugins_by_name[name].source else: raise PappyException('No plugin with name %s is loaded' % name)