A filter is not a list, but silently casts to an empty list? WTF python?

This commit is contained in:
southerntofu 2021-07-29 17:04:08 +00:00
parent 322fa95e8a
commit bd3acddd95
1 changed files with 1 additions and 1 deletions

View File

@ -176,7 +176,7 @@ def load_subscriptions(kind):
print("No `channels.list` file to load for local subscriptions")
subscriptions = []
# Remove comment entries and empty lines
return filter(lambda entry: entry != '', subscriptions)
return list(filter(lambda entry: entry != '', subscriptions))
# Builds a unified id@server from one of those syntaxes, additionally stripping extra whitespace and ignoring `#` as comments:
# - id@server