summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hellkamp <marc@gsites.de>2014-05-05 09:26:59 +0200
committerMarcel Hellkamp <marc@gsites.de>2014-05-05 09:26:59 +0200
commita8bca5819a61b7bfe719f0b85263e4e78ed1e6d4 (patch)
tree25b0794968c0b9c8da18f427a361d976b9426e86
parent6fbb25dcf2272f396a045df46f4780e8f96b5fde (diff)
parentaab40a0c20665d1af77b24ff6331e2d1e63200a9 (diff)
downloadbottle-a8bca5819a61b7bfe719f0b85263e4e78ed1e6d4.tar.gz
Merge pull request #620 from avelino/master
loaded plugins run via command line, ref #619
-rw-r--r--AUTHORS1
-rw-r--r--bottle.py2
2 files changed, 3 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
index 1b7869d..56ac87a 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -62,3 +62,4 @@ Thanks to all the people who found bugs, sent patches, spread the word, helped e
* voltron
* Wieland Hoffmann
* zombat
+* Thiago Avelino
diff --git a/bottle.py b/bottle.py
index eeed37c..5e32209 100644
--- a/bottle.py
+++ b/bottle.py
@@ -2996,6 +2996,8 @@ def run(app=None, server='wsgiref', host='127.0.0.1', port=8080,
raise ValueError("Application is not callable: %r" % app)
for plugin in plugins or []:
+ if isinstance(plugin, basestring):
+ plugin = load(plugin)
app.install(plugin)
if server in server_names: