summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hellkamp <marc@gsites.de>2012-09-19 04:54:28 -0700
committerMarcel Hellkamp <marc@gsites.de>2012-09-19 04:54:28 -0700
commit829f8278bd190b8f92488466b0f0dfd4969766ed (patch)
tree149bc8ea49789c5bc838c60e847b7da30e33d2f2
parentd3a6e1b9758bf93b91db16d99e39edcd2ec50711 (diff)
parentc5381b6af707e6c7d85e2df3af8f401d074661f5 (diff)
downloadbottle-829f8278bd190b8f92488466b0f0dfd4969766ed.tar.gz
Merge pull request #378 from iurisilvio/patch-3
Avoid __main__.ext namespace
-rw-r--r--bottle.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bottle.py b/bottle.py
index 60cd031..28b8448 100644
--- a/bottle.py
+++ b/bottle.py
@@ -3214,7 +3214,7 @@ app.push()
#: A virtual package that redirects import statements.
#: Example: ``import bottle.ext.sqlite`` actually imports `bottle_sqlite`.
-ext = _ImportRedirect(__name__+'.ext', 'bottle_%s').module
+ext = _ImportRedirect('%s.ext' % 'bottle' if __name__ == '__main__' else __name__, 'bottle_%s').module
if __name__ == '__main__':
opt, args, parser = _cmd_options, _cmd_args, _cmd_parser