summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid McMackins II <contact@mcmackins.org>2015-08-23 13:20:34 -0500
committerDavid McMackins II <contact@mcmackins.org>2015-08-23 13:20:34 -0500
commit4cc2ed2544967e3ad25c6a599aabfc3585253b54 (patch)
tree3baeb818384ba4ec1fb65e8ffc2e95f526365cc9
parent3fd6222801a6443586d73698e78bbccb7afec79e (diff)
Can now clear the plugin list
-rw-r--r--coinfetch.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/coinfetch.py b/coinfetch.py
index e6f206e..c2af2bd 100644
--- a/coinfetch.py
+++ b/coinfetch.py
@@ -97,6 +97,13 @@ def get_registered_tickers():
def get_ticker(key):
return _tickers[key][_INDEX['value']]
+## Registers a new ticker API.
+# @param name Name of this ticker.
+# @param description A brief description of this ticker.
+# @param obj An instance of the ticker's implementation class.
+def register_ticker(name, description, obj):
+ _tickers[name] = (description, obj)
+
## Loads a plugin or directory of plugins.
# @param path Path to the plugin file or a directory containing plugins.
def load(path):
@@ -115,9 +122,7 @@ def load_default_plugins():
if exists(plugindir):
load(plugindir)
-## Registers a new ticker API.
-# @param name Name of this ticker.
-# @param description A brief description of this ticker.
-# @param obj An instance of the ticker's implementation class.
-def register_ticker(name, description, obj):
- _tickers[name] = (description, obj)
+## Clears the list of loaded plugins.
+def unload_plugins():
+ global _tickers
+ _tickers = {}