Some feeds, such as those from sourceforge.net, will sometimes show an error
page rather than a feed. In this case the feed cache used to be cleared for
that feed, causing all 'old' headlines to be flooded to the channel as soon
as the feed came back online.
This patch hopefully fixes that by only resetting the cache when the returned
page actually contains headlines.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
When the feed has a specified encoding, we'll be dealing with unicode objects
in the response from feedparser.parse(). To avoid possible UnicodeErrors, we
need to encode() before handing the string off to other functions, so the
other functions are always dealing with bytestrings instead of bytestrings and
unicode objects. Mixing unicode and bytestrings will cause implicit
conversions of the unicode objects, which will most likely use the wrong
encoding.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
Because the 'channel' argument was declared optional, calling announce.list
off-channel without a channel argument caused an error.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 40941e044a)
Because the 'channel' argument was declared optional, calling announce.list
off-channel without a channel argument caused an error.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
Plugins which implement their own listCommands method should pass their
non-typically discoverable commands to Commands.listCommands via this
mechanism. This means that the de-duplication of commands is performed in one
spot instead of having each plugin implement it on their on in their
listCommands method.
This reverts commits 0ce829af6215b97e725f4d6d580d1151950be869 and
09fb0e6fc974445a3414fb03a94625f8538d4570.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
Also added some ImportError handlers to aid letting users of distribution
packages know if the distributions strip out the local module copies.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This simplifies the interface for dealing with announced feeds by providing
separate "announce add", "announce remove", "announce list" commands as
opposed to the one "announce" command with confusing syntax.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>