summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hellkamp <marc@gsites.de>2011-11-16 17:14:45 +0100
committerMarcel Hellkamp <marc@gsites.de>2011-11-16 18:40:41 +0100
commitdb2b85c9e1a37fff416e07a74a33f21ae0493de6 (patch)
treea867406585a62935c75da1d91296b692fdfb51c7
parent6235d7e0a4e9a649c0325c1ba3d0fcca8da7cca5 (diff)
downloadbottle-db2b85c9e1a37fff416e07a74a33f21ae0493de6.tar.gz
fix: load_app now returns any callable, not only Bottle instances.
-rwxr-xr-xbottle.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bottle.py b/bottle.py
index 319e566..b9ac4a6 100755
--- a/bottle.py
+++ b/bottle.py
@@ -2297,7 +2297,7 @@ def load_app(target):
try:
tmp = default_app.push() # Create a new "default application"
rv = load(target) # Import the target module
- return rv if isinstance(rv, Bottle) else tmp
+ return rv if callable(rv) else tmp
finally:
default_app.remove(tmp) # Remove the temporary added default application
NORUN = nr_old