Skip to content

0.2.0b6 / Logger warnings about more than 1 link #123

@pxFIN

Description

@pxFIN

In my case i rebooted host 2 hours ago and

Logger: custom_components.feedparser.sensor
Source: custom_components/feedparser/sensor.py:268
Integration: feedparser (documentation, issues)
First occurred: 14:06:15 (5668 occurrences)
Last logged: 16:19:17

Warnings are about more than one link so basically this:

 def _process_link(self: FeedParserSensor, feed_entry: FeedParserDict) -> str: """Return link from feed entry.""" if "links" in feed_entry: if len(feed_entry["links"]) > 1: _LOGGER.warning( "Feed %s: More than one link found for %s. Using the first link.", self.name, feed_entry, ) return feed_entry["links"][0]["href"] return "" 

Which is OK relevant for some feeds but 'accidentally' noticed on one HA host when trying to download diagnostics logs it was 438 megabytes of which major part is feedparser/warning

Just wondering if _LOGGER.warning is the best choice ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions