Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for planet_name #6

Merged
1 commit merged into from
Feb 15, 2011
Merged

Check for planet_name #6

1 commit merged into from
Feb 15, 2011

Conversation

ext
Copy link
Contributor

@ext ext commented Feb 15, 2011

Ran into an issue when a feed (http://sandervanrossen.blogspot.com/feeds/posts/default) didn't have a <link rel="self" ... /> matching the original url, and had no name was set in config.ini

INFO:planet.runner:Loading cached data
Traceback (most recent call last):
  File "venus/planet.py", line 89, in <module>
    splice.apply(doc.toxml('utf-8'))
  File "/var/www/[...]/venus/planet/splice.py", line 142, in apply
    output_file = shell.run(template_file, doc)
  File "/var/www/[...]/venus/planet/shell/__init__.py", line 66, in run
    module.run(template_resolved, doc, output_file, options)
  File "/var/www/[...]/venus/planet/shell/_genshi.py", line 102, in run
    entry.source.config = find_config(config, entry.source)
  File "/var/www/[...]/venus/planet/shell/_genshi.py", line 35, in find_config
    norm(config.parser.get(sub, 'name')) == feed.planet_name:
  File "/var/www/[...]/venus/planet/vendor/feedparser.py", line 287, in __getattr__
    raise AttributeError, "object has no attribute '%s'" % key
AttributeError: object has no attribute 'planet_name'

This commit fixes this issue by first checking if planet_name is available. In addition it writes to the log if it fails to find any configuration.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant