diff options
author | Iuri de Silvio <iurisilvio@gmail.com> | 2012-09-19 08:11:13 -0300 |
---|---|---|
committer | Iuri de Silvio <iurisilvio@gmail.com> | 2012-09-19 08:11:13 -0300 |
commit | c5381b6af707e6c7d85e2df3af8f401d074661f5 (patch) | |
tree | 149bc8ea49789c5bc838c60e847b7da30e33d2f2 | |
parent | d3a6e1b9758bf93b91db16d99e39edcd2ec50711 (diff) | |
download | bottle-c5381b6af707e6c7d85e2df3af8f401d074661f5.tar.gz |
Avoid __main__.ext namespace
Fix #334.
-rw-r--r-- | bottle.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |