[albatross-users] bug in RandomPageModuleMixin.load_page

Nickolay Savchenko nsavch at gmail.com
Sat May 15 04:50:05 EST 2010


Hi all!

load_page method of RandomPageModuleMixin seems to have a bug. If URL
has dots this method doesn't catch ApplicationError correctly, and
server returns 500 error instead of 404.

Traceback is following:

2010-04-07 17:37:32.215924: //phpMyAdmin/config/config.inc.php?c=uptime
Traceback (most recent call last):
  File "/var/www/ivi/website/modules/app.py", line 167, in run
    self.load_page(ctx)
  File "/usr/lib/python2.5/site-packages/albatross/randompage.py",
line 29, in load_page
    self.load_page_module(ctx, page)
  File "/usr/lib/python2.5/site-packages/albatross/app.py", line 437,
in load_page_module
    raise ApplicationError('%s (in %s)' % (e, mod_dir))
ApplicationError: No module named php (in
/var/www/ivi/website/pages/config/config/inc)

This can be easily fixed with attached patch.

-- 
Best regards,
Nickolay S. Savchenko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: load_page.patch
Type: text/x-patch
Size: 466 bytes
Desc: not available
URL: <http://www.object-craft.com.au/pipermail/albatross-users/attachments/20100514/d0546bfb/attachment.bin>


More information about the Albatross-users mailing list