getpelican/pelican-plugins — pull request #149 by talha131 (2014-02-07 06:43:46+00:00)
Title: Fix an issue in neighbors plugin which was introduced after subcategory ...

...support

It is not necessary that articles will have subcategories. You may
end up getting following critical error.

>
CRITICAL: ("'ArticlesGenerator' object has no attribute 'subcategories'",)
CRITICAL: 'ArticlesGenerator' object has no attribute 'subcategories'
Traceback (most recent call last):
File "/Users/talha/Repos/VirtualEnvs/pelican-dev/bin/pelican", line 8, in
load_entry_point('pelican==3.3', 'console_scripts', 'pelican')()
File "/Users/talha/Repos/VirtualEnvs/pelican-dev/lib/python2.7/site-packages/pelican-3.3-py2.7.egg/pelican/__init__.py", line 346, in main
pelican.run()
File "/Users/talha/Repos/VirtualEnvs/pelican-dev/lib/python2.7/site-packages/pelican-3.3-py2.7.egg/pelican/__init__.py", line 162, in run
p.generate_context()
File "/Users/talha/Repos/VirtualEnvs/pelican-dev/lib/python2.7/site-packages/pelican-3.3-py2.7.egg/pelican/generators.py", line 480, in generate_context
signals.article_generator_finalized.send(self)
File "/Users/talha/Repos/VirtualEnvs/pelican-dev/lib/python2.7/site-packages/blinker/base.py", line 267, in send
for receiver in self.receivers_for(sender)]
File "/Users/talha/Repos/pelican-plugins/neighbors/neighbors.py", line 49, in neighbors
for subcategory, articles in generator.subcategories:
AttributeError: 'ArticlesGenerator' object has no attribute 'subcategories'